Jump to content
  • Advertisement
Sign in to follow this  
hupsilardee

Tri-Tri collision

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to implement triangle-triangle collision, for arbitrary collisions.
I figured that if two triangles intersect, then one of the edges of one of the triangles MUST pass through the other triangle, so at the moment I test for 6 ray-triangle intersections, and return true once a collision is found, (so I thought that in the worst case, 6 checks are performed, in the best case 1 check is performed, so on average 3.5 ray-triangle checks per test is expected performance-wise).

My question is, are there any faster methods?

Share this post


Link to post
Share on other sites
Advertisement

I'm trying to implement triangle-triangle collision, for arbitrary collisions.
I figured that if two triangles intersect, then one of the edges of one of the triangles MUST pass through the other triangle, so at the moment I test for 6 ray-triangle intersections, and return true once a collision is found, (so I thought that in the worst case, 6 checks are performed, in the best case 1 check is performed, so on average 3.5 ray-triangle checks per test is expected performance-wise).

My question is, are there any faster methods?


What about the case where one triangle is entirely contained within the other and both have been projected onto a 2d plane?

Share this post


Link to post
Share on other sites
Oh, I forgot to consider the triangles being coplanar. I could add some ray-ray intersection tests, for the edges of the triangles, and a point-in-triangle for one vertex from each triangle

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!