godot-4-3d-third-person-controller icon indicating copy to clipboard operation
godot-4-3d-third-person-controller copied to clipboard

Camera rotation speed is effected by framerate.

Open MJBrune opened this issue 1 year ago • 0 comments

I'd like to see the camera rotation improved in GDQuest's third-person controller. Currently, it's affected by framerate. If you turn off VSync and set max fps to 1000 (or another high number) then if you get around 400 FPS (try an empty scene) you can see the camera rotation speed become very slow. Likewise limiting to 10 FPS will speed up the camera rotation.

I noticed you multiply the rotation_input by the delta time of the physics process. This doesn't do anything though since the physics process function is fairly statically called. If you place the code to move the camera in the _process then the delta is representative of the current frame rate and thus your camera will no longer be affected by framerate.

If this is a change you'd like to see made, I'd be happy to make it.

MJBrune avatar May 02 '23 07:05 MJBrune