3 ms·
Even better would probably be to run the state update X amount of times per second, not depending on framerate at all. Otherwise you mess with physics. And the
by matsemann 3y ago
Even better would probably be to run the state update X amount of times per second, not depending on framerate at all. Otherwise you mess with physics.
And then render based on delta and interpolate movements.
- nottorp 3y agoI thought thats what i meant by decoupling :) Although using a time delta makes OT easier than having to force X times Per second
- matsemann 3y agoYeah my comment was probably supposed to be to a different sibling. Using a time delta would give different results when doing non-linear stuff. Like applying forces. It's different to apply "force * dt" vs doing "force * 0.5dt" twice. Also if you use a big dt you could end up going through walls or similar. So therefore the physics engine should run at defined ticks in most instances, or it will behave differently based on framerate. https://gafferongames.com/post/fix_your_timestep/ https://gafferongames.com/post/fix_your_timestep/