ImpulseEngine icon indicating copy to clipboard operation
ImpulseEngine copied to clipboard

Repeat simulation with different dt

Open proepkes opened this issue 5 years ago • 0 comments

If a simulation (using forces) is repeated with a lower deltatime (for example 1/120 instead of 1/60), the resulting state will be different even after the 1/120-simulation processed twice as many frames

Is it possible to repeat a simulation with a different framerate and come up with the same result?

I think setting the force to 0 after it has been applied causes the differences, maybe it should be lowered depending on dt? Or the force has to be applied without using dt? https://github.com/RandyGaul/ImpulseEngine/blob/8d5f4d9113876f91a53cfb967879406e975263d1/Scene.cpp#L100

proepkes avatar Sep 19 '20 10:09 proepkes