Hinge Hopping Gone Wild

Feb 26, 2010 at 1:46 PM
Edited Feb 26, 2010 at 1:47 PM

First Off, I would like to say this is one of the best physics engine (and fastest)  I've used for XNA that's compatible with Xbox360.

Easy to implement, easy to modify, easy to use. :)

I've created ragdolls, they work perfectly except for the fact they start hopping, then later explode causing the engine to crash.

To reproduce this popping I'm referring to , simply go to Example6Screen of the Oops.Xna.Framework.Testing.App project

Change line 35 to    this.Reset(300, 0);


Compile, Execute, then start Example 6 and wait for about 30-60 seconds...

...then HOP! boxes fly everywhere.


With my Ragdolls, this happens but by the 3rd Hop the Ragdolls explode then the engine crashes.

So, my question is, Is there anyway we can prevent the Hopping?


Thanks again for your great work.
Regardless if there is a solution to this problem or not, I've learned a lot from your work. :)

Feb 28, 2010 at 9:36 PM

Hey Nexlon, thanks for the kind words about the framework.  I appreciate it.

Unfortunately, one of the reasons the physics are quicker are because I'm skipping some things that really help with stability.  But I'm actively looking into implementing some of these things and the results so far are promising.  So I can see you having issues with ragdolls, especially on the XBOX, because of the slower fp performance.

With that said, you might be able to fix some of the issues yourself for now by changing PhysicsComponent.Update to a do something described here: http://gafferongames.com/game-physics/fix-your-timestep/.  This will ensure that physics is fixed timestep even if you game is not.  It shouldn't be much code and if you need help, let me know.  Good luck!

Mar 1, 2010 at 1:53 PM
Edited Mar 1, 2010 at 1:54 PM

Thanks for the article, that was very useful. :)

Basically, What I did to stop the hopping was constrain the physics time, in ExampleScreen...

            this.physics.MaximumStepTime = TimeSpan.FromSeconds(0.01);
            this.physics.TargetStepTime = TimeSpan.FromSeconds(0.01);

No more hopping.


Thanks Again.


In the next few weeks, if you're interested you can check out what I've done with your physics Engine at www.nelxon.com