# Collision Response - Penalty forces and LCP

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

## 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 on other sites
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.

1. 1
Rutin
45
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 13
• 10
• 12
• 10
• ### Forum Statistics

• Total Topics
633001
• Total Posts
3009821
• ### Who's Online (See full list)

There are no registered users currently online

×