Godot-proposals: Camera3D smoothing

Created on 29 Jun 2020  ·  8Comments  ·  Source: godotengine/godot-proposals

Describe the project you are working on:
3D racing game

Describe the problem or limitation you are having in your project:
That builtin camera smoothing doesn't exist 🤷‍♂️

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Adding smoothing to camera 3D would add a easy way to implement an extremely common feature.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
image

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I would use it in any 3D project I would ever create

Is there a reason why this should be core and not an add-on in the asset library?:

  1. It's an extremely common use case, nearly all games want a smooth camera rather than a camera which instantly teleports to the player (or some other object)
  2. It already exists in 2D and is commonly use
  3. InterpolatedCamera is removed in 4.0 so this would replace part of it's functionality

Maybe there's some technical limitation? Let me know!

core

Most helpful comment

Apart from the complexity, I think this is a great feature request. We could also incorporate positional limits.

Yay, GitHub issues are finally resolved so I can send this message

All 8 comments

Maybe there's some technical limitation? Let me know!

It's not about technical limitations. It's just that 3D camera smoothing is a much more complex topic than 2D camera smoothing (due to additional rotation axes and different game-specific needs).

If this is ever implemented, we'll probably need several properties to control smoothing (translation smoothing, rotation smoothing, ...).

Apart from the complexity, I think this is a great feature request. We could also incorporate positional limits.

Yay, GitHub issues are finally resolved so I can send this message

@nathanfranke I guess you meant translational limits but all in all this is a good feature proposal
with this we could also add things like min and max angle of rotation on different axes this should fix the problem that I commonly see on YouTube videos where you have you have to clamp the camera or create a new gimbal script for FPS games so that your camera doesn't turn over but I don't know to what extent how needed this feature will be

Although it's not necessarily a catch-all solution since many FPS games would attach the camera to a player model, so limiting the camera angle wouldn't prevent the player head (parent of the camera) from looking down and backwards.

@nathanfranke I guess the camera could have a parameter called lock_globally == true which means the player could rotate but the Camera would not, but if the value of lock_globally is false then rotate with the FPS .Am not really sure if this makes sense

Or we could just stick to using clamp since it's just a few lines of code that can't be a problem for anyone to write except maybe beginners

We shouldn't bother making everything complicated when a single clamp would fix it. However, we should still implement the translation limits. I am not sure about rotations.

Yeah the translation limits are good since there is a very simple way around rotation

Was this page helpful?
0 / 5 - 0 ratings