CesiumGS / CesiumGS/cesium-unity

Dynamic Camera suddenly slows a lot when going down

Open
#444 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
535
Forks
132
Avg merge
6h 45m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the dynamic camera input handling function and its FixedUpdate call, then inspect how downward movement and scroll-wheel input use Time.fixedDeltaTime. Verify the reported slowdown while moving directly down and confirm that input is handled reliably and movement speed remains consistent after the timing change.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.