Jump to content
  • Advertisement
Sign in to follow this  
shaobohou

conservation of momentum in physics engine

This topic is 4377 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am interested to know how far physics engines (commerical or otherwise) go to preserve momentum after collisions. I wrote a very simple physics system that detects when objects penetrate each other (after update via ODE solver for a small time step) and simply reset the states to that of before the update, closest points between the object are then assumed to be the collision points and used to compute collision response. Clearly, total momentum before and after collision will not be the same (assume friction coefficients of 0) and the difference can be reduced (but not completely eliminated) by trying to update again using half the timestep. So how do other physics engines handle this?

Share this post


Link to post
Share on other sites
Advertisement
I don't have an absolute answer for you, because I don't know the internals of all the engines. For engines that use penalty-type methods, there is pretty much guaranteed to be a loss or gain in total momentum of the system. (Hopefully not a gain in energy.) But, for engines that use closed-form collision response via an impulse-momentum approach, then total momentum would be conserved. (Engines often don't implement this approach, since it becomes difficult to manage when there a body can experience multiple simultaneous collisions, or when collisions occur at different times within a time step.)

Share this post


Link to post
Share on other sites
If you need a good physics engine, check out newton, which does preserve momentum and energy very good, enough good that it can handle a Newton's Cradle very well, without task-specific cheating or hacking.

See demo here:
http://physicsengine.com/downloads.html

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!