Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.7.1
Issue ID
1301053
Regression
No
CinemachineFreeLook Camera jitters when it is controlled by InputValues and UpdateMethod is set to FixedUpdate
Reproduction steps:
1. Open user's attached project and Scenes/test scene
2. In the Hierarchy window, select Camera
3. In the Inspector, expand the CinemachineBrain component
4. Set the Update Method and Blend Update Method to Fixed Update
5. Enter the Play mode
6. Move the mouse and observe the Game view
Expected result: Camera moves smoothly
Actual result: Camera jitters
Reproducible with: 2.6.0-preview.8 - 2.7.1 (2019.4.17f1, 2020.2.2f1, 2021.1.0b2)
Could not test with: 2018.4.30f1(error when downgrading)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
User error.
The code in Character.Update() supplied in the project is assuming a fixed deltaTime, which does not correctly account for deltaTime variability, so will always produce jitter. Moving that code to FixedUpdate eliminates this problem.
To get smooth camera tracking, the camera must update on the same clock (Update or FixedUpdate) as the thing it's tracking. The SmartUpdate mode of the CM Brain analyzes the movement of the target (by "movement" here we mean: it's transform changes) and updates the camera on the same clock as the target. You can check this by playing the game and looking at the FreeLook inspector: in playmode, it indicates the update clock it's using, next to the Solo button.
Changing the CM Brain's update mode to FixedUpdate won't remove the jitter unless you _also_ change Character.cs to do its work in FixedUpdate() instead of Update().
Note that if the character's transform changes in _both_ Update() and FixedUpdate(), you will not get good results because there will be no way for a camera to track that smoothly. You must choose one clock or the other.