Version: Unity 6.3 LTS (6000.3)
LanguageEnglish
  • C#

Time.fixedDeltaTime

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static float fixedDeltaTime;

Description

The interval in seconds of in-game time at which physics and other fixed frame rate updates (like MonoBehaviour's MonoBehaviour.FixedUpdate) are performed.

The fixedDeltaTime interval is always relative to the in-game time which Time.timeScale affects. A fixedDeltaTime of 1 second in a game with a Time.timeScale of 0.5 means fixed updates occur every 2 seconds of real time.

Note: To support high-precision simulation and prevent time drift in long-running games, Unity uses a more complex internal representation for time steps. When you set Time.fixedDeltaTime, the value is quantized to align with the internal high-resolution grid. When this value is cast back to a float for the fixedDeltaTime getter, it can differ by a single bit (one unit of least precision) from the original value due to this internal conversion.

For more information on how this property relates to the other time properties, refer to Time and Frame Rate Management in the Unity manual.