Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question FixedUpdate when Time.timeScale = 0

Discussion in 'Physics' started by Tom163, Jun 8, 2023.

  1. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,263
    According to the manual, FixedUpdate should be called independently of the game speed, so even if Time.timeScale = 0, correct?

    Because I don't experience this. When I pause the game by setting Time.timeScale = 0 it seems that FixedUpdate() isn't called anymore. Is that possible?
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,413
    That may be easily misunderstood. It means that the execution rate of FixedUpdate is fixed and independent of the visual frame rate.

    The game speed is defined by Time.timeScale. For example, 0.5 means half of the real time. To achieve that, FixedUpdate is also called at half of the rate defined by Time.fixedDeltaTime. When timeScale is 0 then FixedUpdate is not called so the gameplay is paused.