Sign in to follow this  
Mazer

triangle-triangle collision detection

Recommended Posts

Hi. I've been reading up on collision detection, and pretty much everything that I've seen covers line-plane collisions and line-triangle collisions (by checking for a line-plane and then checking if the point of intersection lies on the triangle). But what about triangle to triangle collisions? My first guess would be to treat each vertex in one triangle as a line (using current position, and position from last frame possibly) and use those to check against the triangles of the other mesh for collisions. What I want to know, is whether this is the "proper" way of doing collision detection. Is there a better way?

Share this post


Link to post
Share on other sites
I'm working on triangles at the moment for my latest attempt at a 3d editor, at the moment it's all based on triangles, the thing with collision as you asked though is usually you check for collision in a certain direction, such as forward or, and to the sides, thats why a line is suitable, using a plane is probably the most simple way to do it as well, you lay the plane flat with the triangle (what ever direction the triangle faces), then just see if the line goes through it.

Using lines from vertices means you'd have to do a lot more checking.

Share this post


Link to post
Share on other sites
Look in the Math & Physics Section, as I would bet that All the answers to your questions have already been answered plenty of times. Also try [google] groups, as these algorithms have been throughly explained, and you can even find free source code as coding tri-tri collision can be complex for a beginner.

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