Hi all,
In Urho update methods we get timestep value which is used as a factor to make sure speed is consistent no matter the fps. In addition, the physics engine in Urho works with its own update loop and uses timestep internally for its calculations.
Maybe I missed it in the docs, but what are the rules to when I’m supposed to apply timestep and when not, when dealing with physics?
Right now my rule of thumb is that if the action I do is based on time measured by the timestep, I use it, while if not - I don’t use it.
For example if I need to apply a single impulse on a rigid body I won’t use timestep. But if I apply a constant force for 10 seconds, which I measure using the timestep, I will apply the timestep factor on every frame I apply the force.
Is that a correct approach? Are there any pitfalls I should be worried about when dealing with physics / timestep?
Also while on this subject - if I use this option to limit FPS to emulate what would happen if a weak computer runs my game:
Will that be a reliable simulation? Or does it always add the delay at the last frame or something like that and there’s a better method to emulate inconsistent low FPS? Ofc I can always run lots of CPU eating apps in the background, but I prefer a cleaner approach if there’s one.
Thanks.