Timesteps #
Need to provide an introduction to timesteps.
Fixed Timesteps #
A fixed timestep is an update/tick that executes at a deterministic and constant rate.
We could go further in our explanation, but it’s been explained better by so many others. Most notably is Glenn Fieldler’s Fix Your Timestep!. This is considered critical reading material for game developers, and does a great job explaining the basic implementation of a fixed timestep from the standpoint of C-style pseudo code.
For further reading on the subject, feel free to read any of the following articles:
Unity and FixedUpdate
#
Unity supports a fixed timestep as a standard part of their Time
and MonoBehaviour
APIs. However, like any timestep (fixed or otherwise), it’s important to understand some of the specific mechanics and “gotchas” of its implementation.
The article
Fix your (Unity) Timestep! is a great article that allows some of the intricacies of how and when FixedUpdate
is called in comparison to the standard Update
method.
If you’re looking to solve visual problems (jitter/choppiness) created by the fixed, but sometimes uneven, tick rate of Unity’s FixedUpdate
, be sure to checkout Kinematic Soup’s article
Timesteps and Achieving Smooth Motion in Unity.