- Home /
FixedUpdate vs. Update for instantaneous ForceMode's
If I have a script that is only adding forces with Impulse or VelocityChange, is there any reason to use FixedUpdate instead of Update?
http://unity3d.com/support/documentation/ScriptReference/ForceMode.html
Answer by skovacs1 · Sep 28, 2010 at 07:12 PM
FixedUpdate is called every fixed framerate frame.
Update is called every frame.
Because Update is framerate dependent, if your framerate changes (as it likely will) adding forces or making velocity changes may make your object behave inconsistently. FixedUpdate is called at a consistent rate and therefore will behave consistently. As Unity's physics engine does its calculations at a fixed rate in a FixedUpdate, having interim numbers from your changes in Update (calculated using the Time.deltaTime for example) can also result in even more inconsistencies because the changes won't be applied until the physics calculation.
If your changes to physics information are few enough and far enough between, you likely won't notice the difference. There's also the fact that FixedUpdate is usually called less often than Update and this means that you would be doing your calculations less often when that is the case.
Your answer
Follow this Question
Related Questions
AddForce in Update 1 Answer
Is it okay to use ForceMode.VelocityChange in Update()? 1 Answer
Moving an object using rigidbody.AddForce & keyboard input. 1 Answer
adding force 1 Answer