# Improved Collision Detection paper question

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

## Recommended Posts

I've been studying the "paper" Improved Collision Detection and Response http://www.peroxide....n/collision.pdf

This algorithm does collision checks between a bounding sphere and a triangle soup.
When checking for a collision, the paper enumerates the three following conditions that must be checked:

The sphere can collide with the inside of the triangle.
The sphere can collide against one of the three vertices of the triangle.
The sphere can collide against one of the three edges of the triangle.

I'm struggling to understand the meaning of the second two. Why is there a distinction between the "inside" of the triangle and its vertices and edges. Mathematically speaking, this doesn't make sense to me. It seems like the "inside" of the triangle should include the vertices and edges That is to say, if you don't intersect with the "inside" of the triangle, why check if you intersect a vertex or edge?

If anyone is familiar with this paper or has any insight into this question, it would be appreciated.

##### Share on other sites
Because the 3 conditions are resolved differently.

Q: If a ball is intersecting a point (vertex) on the triangle, which way do you push the ball to get it off the triangle?
A: Away from the point.

Q: If the ball is intersecting an edge of the triangle, which way do you push the ball to get it off the triangle?
A: In the direction of the edge normal.

Q: If the ball is inside the triangle, not touching an edge or point, which way do you push the ball to get it off the triangle?
A: Away from the center point of the triangle.

Your thinking is entirely backwards. The inside is not the full description of the triangle, it is the last-ditch exception case that should only be considered if the other 2 fail.
The other 2 are the important ones. In a robust algorithm, a ball will not be able to enter a triangle.
But there are conditions, especially with instant-impulse physics engines, in which a ball may be able to pass through an edge or point, into the insides of the triangle.

There is no best-case solution for this error, since such a thing does not happen in the real world. In the real world, balls bounce off the edges and corners of triangles.
That is why the last 2 cases should be making more sense to you than the first.

L. Spiro

##### Share on other sites
Thank you. That makes much more sense to me. I will re-read the collision detection section with those thoughts in mind, and post back if I have any more questions.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 11
• 23
• 42
• 75