Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.9.7
3.0.0-pre.7
Issue ID
CMCL-1507
Regression
No
Cinemachine Camera snaps on a moving GameObject incorrectly when changing Time.timeScale
Reproduction steps:
1. Open the attached "repro_IN-51531.zip" project
2. Open the "SampleScene" Scene
3. Enter the Play Mode
4. Wait for the Camera to zoom out
5. Observe how the Camera positions after it zooms back on the cube
Expected result: The Camera positions itself so the cube is on the left
Actual result: The Camera positions itself so the cube is on the left, but then it immediately snaps so the cube is in the center, then moves back to the initial position with the cube being on the left
Reproduced with: 2.8.9 (2021.3.29f1), 2.9.7 (2021.3.29f1), 3.0.0-pre.7 (2022.3.8f1, 2023.1.10f1, 2023.2.0b6, 2023.3.0a2)
Reproduced on: Windows 10 (22H2)
Not reproduced on: No other environments tested
Note: Reproducible in Player
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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
The problem here is that the project is using SmartUpdate and messing with the timescale. These two things are not compatible, because when the time is resumed after being paused, SmartUpdate - which attempts to dynamically deduce the nature of the target's motion - gets confused about how the target is moving.
The solution is to decide how you want the camera to update (FixedUpdate or LateUpdate) and set that mode, while making sure that the target moves only on the desired clock.
In this scene, there are 2 choices to make the motion smooth:
Set the CMBrain to update on FixedUpdate.
Alternatively, enable Interpolation on the Cube's Rigidbody, and put the Brain in LateUpdate mode. If you do this, be sure to move the cube only in ways that are compatible with Rigidbody Interpolation. Generally, this alternative will produce smoother results than the FixedUpdate approach, because camera frames and render frames will be synchronized.
Note: always test motion smoothness in a build, to eliminate artifacts caused by the Unity editor's tendency to produce uneven frame rates.