Help what am I doing wrong? If phyiscs go in fixed update how are you ment to pause the game?

Like I say physics go in fixed update and I understand why but only recently found out that fixed update doesn’t stop when time.timescale is set to 0. So I have a number of objects that are using “.AddForce(transform.forward * -500” for example. When playing the game they work perfectly well. But if you pause the game or slow it down to 0.25f the AddForce works totally different drastically. What am I doing wrong?

Two good discussions on Update() vs FixedUpdate() timing:

Here is some timing diagram help:

EDIT after seeing @kdgalla 's post below: if you want to smooth things out in slower timescales, then whenever you change Time.timeScale, call this:

// call this after whenever you change Time.timeScale:
        int DesiredPhysicsStepRate = 60;
        Time.fixedDeltaTime = Time.timeScale / DesiredPhysicsStepRate;

Although technically in the edge case of timeScale being zero, Physics only lets you go as low as 0.0001s

I haven’t messed with thos sort of thing before, but I think you need to change the “fixed timestep” for physics.

1 Like

Thanks for the help guys. Appreciate it.

1 Like