I have a requirement that I be able to save the state of a physics simulation to disk, load that information back from disk, restart and get the same results (not just close) to that I would have gotten if I never saved and reloaded. I have unit test
which test for this.
My question is what information must I store (I can't use built in serialization) to make this possible.
It should be noted that I have turned off "EnableWarmstarting".
I currently save position, rotation, velocity, angular rotation, mass, size of every body in the simulation and about 50% of the time I get back the same results (after 300 time steps). The other 50% of the time I am getting positions which are
close (0.001) to the original values but they are not the same.
It looks like it's the physics simulation which is causing these differences based on the state of the bodies at time of saving.
I am using source control revision number 87480.
Any help would be appreciated.