About Rigidbody in FixedUpdate

Rick’s demonstration showed good functionality about making the player be able to jump, but he put a physics calculation logic (which is Rigidbody 2D) on the Update event, why did he do that? Is that supposed to be on FixedUpdate?

Yes he can do it, if he multiplies it by Time.deltaTime.

From what i observed around the internet, multiplies it by Time.deltaTime is not about to make the physics calculation run constantly but it is about converting to another unit, so it is not the case.

Here is what i’ve found:

Multiplying by Time.deltaTime doesn’t make a calculation run constantly but it makes it frame independant.

One of the many reasons why things like jumping in a platformer are done in Update is because there’s no real need to use FixedUpdate, since it’s just a “press button do this immediatly” kind of action, it isn’t constant. There’s also control issues and you can test this out pretty easily, put the entire method into FixedUpdate and start jumping like crazy, you’ll notice that, for some reason, FixedUpdate has some issues reading the input, causing it to sometimes have a very awkward input lag that can be super annoying.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms