What cause a scene to 'explode'?

Mar 4, 2011 at 3:46 AM
Edited Mar 4, 2011 at 3:52 AM

I've been trying to solve this bug for a while now, occasionally just before a collision happens the scene effectively explodes (some bodies just fly upwards really fast for example) and there's a generel mess of things made. This happens maybe 5% of the time seemingly before or during a collision and i'm no certain it's not because of anything on my end. The typical thing that happens is all the bodies fly upwards very quickly as if someone added a +(0,1000) impulse force to them.

 

So what's cuasing this seemignly random self destruction in the physics simulation?

Coordinator
Mar 4, 2011 at 9:16 PM

Are the bodies connected with any joints?

Mar 6, 2011 at 9:06 AM

 They're not connected by anything, they amount to a set of boxes stacked on top of each other in creative fashions.

I've been able to consistantly reproduce it in this video: http://jabberworx.net/upwardsgo.wmv but it happens just about everywhere else in the game and like I said, I have no idea what I could be doing to cause it to happen sometimes but not other times.

Coordinator
Mar 6, 2011 at 12:16 PM

To me it looks like the parts fly away when other parts it touches are removed. How are you removing the bodies?

Mar 6, 2011 at 12:53 PM
Genbox wrote:

To me it looks like the parts fly away when other parts it touches are removed. How are you removing the bodies?

Bodies which are meant to be deleted have a flag raised on them, after the next update time step I iterate through all bodies and find the bodies with flags on them and delete them.

However something rather odd I do is before I delete a body (or even raise the delete flag on them) I move them to a distance like (10000,100000) just to get them out of the way of the physics simulation. That might be causing some sort of issue as well...