Archived

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

AxoDosS

Collision Detection

Recommended Posts

AxoDosS    284
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
OmniBrain    148
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
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