Sign in to follow this  
DonDickieD

Collision Response - Penalty forces and LCP

Recommended Posts

DonDickieD    2751
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
MrRowl    2490
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this