CinemachineImpulseSource does not work for timescale=0
Even if I told him to ignore timescale
CinemachineImpulseManager.Instance.IgnoreTimeScale = true;
Or the brain ignore timescael
I tried to work on 2022, but not on unity6000, so I think this is a bug
test code:
Time.timeScale = 0;
Cinemachine.CinemachineImpulseManager.Instance.IgnoreTimeScale = true;
GetComponent<CinemachineImpulseSource>().GenerateImpulse();
yield return new WaitForSecondsRealtime(1);
Time.timeScale = 1;
What version of Cinemachine are you using?
Thanks.
If you set Time.timeScale = 0, then physics will stop, and you will get no FixedUpdate calls. Could that be the source of the problem?
thanks
This is indeed the reason for FixedUpdate
I changed the updatemethod for brain to lateupdate
GenerateImpulse worked
But I can’t change updatemethod to lateupdate
This is because the camera will shake when it moves
How can I solve this problem
This is a common problem that people have. It’s an aliasing issue between physics frames and render frames, which do not run on the same clock.
It’s always best to operate the Brain in LateUpdate, and to move your objects in Update.
For Rigidbodies, you must move them in FixedUpdate, but if you enable Interpolation on the Rigidbody and use the correct Rigidbody API when moving it, Unity will convert its motion to be Update-compatible. If you do this correctly, the shaking will disappear.
Thanks
That solved my problem
1 Like