Update vs FixedUpdate

Hernando Nieto Jaramillo
1 min readAug 11, 2021

--

While working with a controller on this blog, I discovered something different than what I thought before

Using this code

At first, I thought the Player will “Teletransport” from position 0 to position 20 in 1 frame, but surprisingly, it kept moving upwards smoothly

Trying to find out the answer, I saw the Unity documentation, and it says some like “Update frame rate is variable, FixedUpdate frame rate is the same value”. Ok, yes, the last one is 0.02 by default and in Update varies, but it didn’t answer my question.
Also I found information such as “Update is for stuff like inputs, FixedUpdate for physics”. Ok, but still trying to find out the solution

It wasn’t until I did some math with Debug.Log to find out that both Update and FixedUpdate work independently, so if I use controller.Move () it will keep moving, no matter the Update ()

--

--

No responses yet