Cinemachine and Scale Time Issue

Hey there!

I’m trying to implement a pause menu in my game by setting the time scale to 0.
This menu consists of 3D object UI buttons (sitting in a camera screen space canvas) that have their material glow when the mouse is above. Full disclaimer - I’m using Playmaker and Dotween to make all actions/animations happen (not a lot of coding experience).

In my scene I have a 3rd person cinemachine virtual cam following the player.
If the player doesn’t move and I pause, there is no issue with the menu UI (I’ve set dotween animations to independently update, no problems with timescale).
But if while the player is moving (if there is input) I pause the game, all animations/playmaker actions freeze. I have to unpause and wait for the camera to catch up to the player, before I can pause and the menu will work again.

I’ve figured out that setting cinemachine’s blend update method from late update to fixed update solves this issue, but that then causes my player to jitter when moved (no matter what the update method is).

My solution at the moment is to send an action each time I pause/unpause that switches the blend update method between late/fixed (since when I’m paused I don’t care about player movement jitter). I’m wondering if there is a better solution that doesn’t require this manual switch each time? Thanks!

Your solution sounds very dangerous as it just hides the problem. :slight_smile:

It is difficult to say what the issue for the freeze is. Could you send me a project where I can reproduce the problem? It may be a bug in Cinemachine, but most probably something else. But I’d like to investigate.

Sure, I’ll send you. Thanks :slight_smile:

Have you tried setting CMBrain’s IgnoreTimeScale flag?

8522591--1136678--upload_2022-10-18_10-7-9.png

Hey Gregory, yes I have. Doesn’t seem to influence the problem at all, only the blend update method has an effect.

Note that if you use Mathf.SmoothDamp anywhere, it uses Time.deltaTime behind the scenes unless you pass an alternative delta.