• Advertisement

Archived

This topic is now archived and is closed to further replies.

Collision Detection

This topic is 5776 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

Hi! My question is: How do I detect if a point is in a triangle? I know how I can detect if a point is in a plane by knowing the plane normal but what happens is that it creates an infinite plane that is not restricted to the triangle.

Share this post


Link to post
Share on other sites
Advertisement
Check http://www.gamedev.net/community/forums/topic.asp?topic_id=90919
there was a discussion about detecting a sphere-triangle collision. Reading that should help you.

Have fun.

Share this post


Link to post
Share on other sites
Thank you very much!!

Now my collision detection function works perfectly =D

Share this post


Link to post
Share on other sites
Just my 2 cents:

you can check if point is in a region of any shape that doesn''t have overlaping lines by puting one point outside and drawing a line to the point you''re checking. If it crosses (x mod 2 = 1) lines, then it''s inside, but if (x mod 2 = 0) - outside

Share this post


Link to post
Share on other sites

  • Advertisement