CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Dynamic Camera suddenly slows a lot when going down #444

Open ThomasBillaud2 opened 6 months ago

ThomasBillaud2 commented 6 months ago

I have noticed that when moving down the dynamic camera (by pressing Q or C), it sometimes slow down a lot, so much it seems like the entire camera froze. I can still rotate the camera with the mouse when this happens. Also, I've noticed it only happens when I'm going down directly. If I move (with WASD) while going down, the speed works just fine.

I managed to fix it by moving the input handling function call from FixedUpdate to Update and changing every use of Time.fixedDeltaTime with regular Time.deltaTime.

Making this change also allowed to fix another issue where some inputs like the scroll wheel were not always cought by the code.