- Home /
Fixed timestep...
Can anyone explain me in depth what is fixed Timestep, I am not able to understand by reading the documentation..
Answer by whydoidoit · Dec 09, 2013 at 12:17 PM
So it's to do with Physics. Basically the physics system does not run every frame, it runs in order to catch up with the current frame rate. Every time the physics loop runs it moves the time forward by the fixed time step.
So if your fixed time step is 0.02s you are asking for 50 updates a second. Let's say your game is running at 100fps - the physics system will be called once every other frame (roughly) so that physics keeps up with the game.
If your game is running at 25fps the physics system will run twice every frame for the same reason.
So basically every time the physics loop runs "0.02" seconds will have passed in simulation time - irrespective of how long has passed in real time since the last call. The loop will continue to go around while the physics time is behind the real time of the game.
so which one is better 100fps and 50FixedUpdates/sec or 25fps and 50FixedUpdates/sec...???
Often on slow devices the high fixed frame rate will make everything worse because physics will run multiple times.
So 25fps game is struggling to do 2 physics updates at the same time.
okkk,,,i got it ,,so you are saying that its better to have less physics updates(FixedUpdates/sec) when we have more fps in slower devices(if both compared).
Your answer
Follow this Question
Related Questions
"Fast" fixed timestep 1 Answer
InvokeRepeating OR Update OR FIxedUpdate? 2 Answers
A node in a childnode? 1 Answer
How to perform a task in a specified time 2 Answers
Slow update best practice 0 Answers