# Collisions - set of contact points

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

## Recommended Posts

I am trying to find somewhere a picture ilustrating set of contact points between two boxes, but without luck.
If two boxes are intersecting, how should contact pairs (manifold) looked like ? Can someone post me a picture ? All I found was pictures, when boxes are only "touching" but in my physics engine, boxes not always only touching each other, but before applying physics, they are intersected (eg. First box is in half of second)

Fow example in this case\can someone show me contact manifold ?

##### Share on other sites
A suggestion:
the fact your boxes are intersecting (inter-penetrating) implies that the their projection intervals on all candidates for separating axis, intersect.
The intersection of two intervals is an interval, when they intersect. Hence computing those intervals of intersection gives you the projections of the volume of intersection (of the two boxes) on these candidates for separating axis.

You will never find such an implementation because collision (detection) response deals with contacts of the type "face-face", "face-edge", "face-vertex", "edge-egde", ... There's no point computing a volume of intersection (set of all points of box1 inside box2): it is not needed.
Or people compute a penetration depth, and some other informations related to it.

##### Share on other sites
I already have infos from SAT (penetration depth, normal). So I should move those boxes out of colision state first - then I got face-edge case and solve that ?

##### Share on other sites
Quote:
 Original post by martinperryI already have infos from SAT (penetration depth, normal). So I should move those boxes out of colision state first - then I got face-edge case and solve that ?

Yes, you can do that. From there, you can know exactly what type of contact you've got.

##### Share on other sites
You can create a set of several contact points using the following algorithm:

1) Use SAT to identify the axis of minimum penetration. For now we just assume that this is a face normal as in your example. Let's call this the reference face.
2) Find the incident face on the other shape. This is simply the most anti-parallel face.
3) Clip the face polygon of the incident face against the side planes of the reference face.
4) Keep all vertices of this clipped face which are below the reference face

Some hints:
- The face normal of the reference face defines the contact normal (for all points)
- The penetration depth of the each contact point is the distance of each vertex to the reference face plane
- Move all points onto the reference if you want cull the contact points to e.g. a maximum of four points

Finally note that I didn't handle edge contacts here. This happens if the axis of minimum penetration is the cross product of two edges. Anyway, this should get you going.

HTH,
-Dirk

1. 1
2. 2
3. 3
Rutin
13
4. 4
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633696
• Total Posts
3013394
×