In this tutorial I will show you how to get delta time in C++ and how to implement a Fixed Update Loop.
@NeZversSounds Жыл бұрын
I didn't catch one thing. Theoretically if game receives a lag, causing delta time 2x bigger than simulation time. I didn't notice handling of such situation where you would need to simulate more than once or lerp overshooting.
@x_vye Жыл бұрын
Normal dt should not be capped at a fixed timestep. To failsafe the lerp overshooting, you can implement a clamped lerp function between 0 & 1.
@Cakez77 Жыл бұрын
Yes, very good question and I should have talked about it. If you have more than twice the delta time during a Lagg, then we update the game twice before rendering. But as stated above, you can also implement the clamped lerp. In this case it wont happen tho.