- Home /
Why when set Time.TimeScale = 0,Unity does not Call FixedUpdate() anymove?
and why when set TimeScale‘s value,it affect the time between call FixedUpdate()
Answer by myzzie · Mar 29, 2019 at 09:42 AM
First of all, please search the docs/forum before posting.
Time.timeScale
FixedUpdate functions will not be called when timeScale is set to zero.
Have a good day!
Hi,I have looked for the doc,and I know that it will not be called when timeScale set to zero.
But I want to know why unity use timeScale to control the frequency of the FixedUpdate() but not use some independent param.
Thanks for your answer~
hello! you are a bit confused about how timescale works, the fixedupdate gets called once each physics cicle, the frequence of the fixedupdate is managed from a separate variable (that can be set in the project settings time section) that is what i imagine you mean by independent parama, most of the unity events are frame dependent, like the inputs, they are catch every frame, the time between frames changes depending on the amount of work on each frame(maybe in one frame you are doing extra operations) thats why the physics is being updated independant of the frame, for getting more precise calculations, since its called every fixed time not every frame. as i said the fixed time can be set up manually in the inspector, but here comes the time.timescale thats use usually for slowing down the game for example, if you want your full game to go half speed, it would make 0 sense if the physics werent affected, imagine if you want you set up your game to go with a time.scale of 0.1 the physics would be called like 10 times faster than it usually would compared to the update and would bring undesired behaviours. is there anyu case why you neeed your fixedupdate to be fully independent of time.timescale? i cant think of any
Your answer
Follow this Question
Related Questions
Time.timescale set to 0 whenever i start 7 Answers
Time.timeScale=0 after Animation 2 Answers
Time.deltaTime not measuring seconds accurately 3 Answers
OnMouseDown problem. 0 Answers
How do I stop 'timeSinceLevelLoad' without pausing entire game? 2 Answers