Original Post
Hello
I'm looking for a free, cross-platform (windows and linux is enough for me), C/C++ physics library which can also step physics back in time, not only forward in time.
For example, what I want to do looks like this:
[source lang="cpp"]world.update(0.05);
world.update(0.05);
...
world.update(-0.025);
world.update(-0.05);
world.update(-0.025);[/source]
And I want to get the same state in the end as it was at the beginning.
I have already tried Box2D and chipmunk physics. Box2D only stops time for negative values (does nothing), chipmunk does the thing (ok not very accurately) as long as there are no collisions. If there was a collision meanwhile, I get completely different result when rolling things back in time. Without any collisions it works.
Have you guys ever did this, or know which library can do it well?
I could even try ODE, if it can do this. It's 3D, but I can use it for 2D too I guess.
I'm looking for a free, cross-platform (windows and linux is enough for me), C/C++ physics library which can also step physics back in time, not only forward in time.
For example, what I want to do looks like this:
[source lang="cpp"]world.update(0.05);
world.update(0.05);
...
world.update(-0.025);
world.update(-0.05);
world.update(-0.025);[/source]
And I want to get the same state in the end as it was at the beginning.
I have already tried Box2D and chipmunk physics. Box2D only stops time for negative values (does nothing), chipmunk does the thing (ok not very accurately) as long as there are no collisions. If there was a collision meanwhile, I get completely different result when rolling things back in time. Without any collisions it works.
Have you guys ever did this, or know which library can do it well?
I could even try ODE, if it can do this. It's 3D, but I can use it for 2D too I guess.