Sep 13, 2012 at 10:19 PM
Edited Sep 13, 2012 at 10:19 PM
I have implemented solution where I'm serializing world into file.
To get an ability to restart simulation after deserializing it.
But when I use this code for deserializing (So I don't create new world, but clears existing one, and fill it again from file):
new WorldXmlDeserializer().Deserialize(world, stream);
I have an problem with doubling contacts count after each restart (so simulation is after very slow after while, because of high contacts number).
If i use this code (So I will throw away old world and create new one from nothing):
return new WorldXmlDeserializer().Deserialize(stream);
Issue with contacts doubling is solved.
But it still looks like there is an problem in World.Clear() method.
So it doesn't really clear world?
Bodies and contacts count are really zero, after call to clear. But after start of simulation, contacts count is higher than it may be..