Jump to content
  • Advertisement
Sign in to follow this  
Dirk Gregorius

Collision Response - Penalty forces and LCP

This topic is 4801 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

Hi, given two rects that interpenatrate. The collision detection returns the penetration depth plus two contact points and two contact normals. As far as I understand at the moment I have to compute the relative velocities and classify the contact to either 1.) Colliding contact: v_rel * n > 0 /* or */ 2.) Resting contact: v_rel * n = 0 To 1.) How do I compute a penalty force that pushes the object apart again. Can I simply use F = stiffness * penetration_depth? If it would be that simple - how do I find the stiffness? Could the stiffness be derived from the restitution for example? I also saw equations that use a damping term as well. Why does it make sense to write F = stiffness * penetration_depth + damper_constant * v_rel? And how do I compute the damper_constant? To 2.) Do I have to compute a penalty force when I have a resting contact as well ? In other words - is it possible that objects are still interpenetration, but I do have a resting contact situation? And how do I compute the resting forces when using penalty forces? Could I use the LCP approach like suggest e.g. in Eberly: Game Physics? Any help is appreciated -Dirk

Share this post


Link to post
Share on other sites
Advertisement
One way is to calculate the force/impulse that would make the objects have a separation velocity that would separate them over a certain timescale (maybe over the next 3/4 timesteps), capped to some fairly small velocity (e.g. 1 m/s). This way the force/impulse is automatically scaled according to the masses/moments of inertia of the bodies and results in the bodies gently-but-firmly separating, without the system exploding if the penetration is great.

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!