How do you slow down the frequency of FixedUpdate in Unity?

There is always a confusion whether to use Update or Fixed update for your script and the most common answer you get is to use Fixed update when physics is involved. You can read our post on Unity update to understand the differences. In this tutorial we will see how to slow down the frequency of FixedUpdate in Unity.

Using Time.timescale

Unlike Update, FixedUpdate responds to Time.timescale. This is used generally to pause a game in Unity. So, using Time.timescale can pause other time related function in Unity. But if you are sure, you are not using any other time-based function then you can set the Time.timescale between 0 and 1 to control the FixedUpdate frequency.

Example script

if (Input.GetButtonDown("Fire1"))
            if (Time.timeScale == 1.0f)
                Time.timeScale = 0f;
                Time.timeScale = 1.0f;

Using Time.fixedtimestep in Editor settings

You cannot change this value from script.

Free Unity asset banner

  1. Go to Edit>project settings.
  2. Then click on the Time panel.
  3. Enter the desired time in Fixed Timestep.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.