Search Issue Tracker
By Design
By Design in 3.0.X
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
- 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:
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.
Resolution Note (3.0.X):
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.