# Ray Triangle Intersection in 2D space.

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

## Recommended Posts

Hi Guys: I am looking for a really fast solustion for Ray Triangle Intersection in 2D space. 1. A point P(xp,yp), and a Vecter Dir(xd,yd) 2. Three points T1,T2,T3 constructed a triangle. 3. The point P must be in the triangle, witch means the ray cast from inside of the triangle to the outside (or maybe cast alone one edge of the triangle). I don't think the ray-line intersection detection will be the fastest way to do this, anyone have any ideas? PS: small issue. for example: If the P = T1 and the Dir = T2 - T1 then the intersection point should be T2(not any points on the T12 EDGE), and the intersection EDGE should be T23,(not the T12). Thanks for your help.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 9
• 15
• 14
• 46
• ### Forum Statistics

• Total Topics
634067
• Total Posts
3015322
×