🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Noob question regarding checking point in triangle using barycentric coordinates

Started by
10 comments, last by NewbZach 4 years, 10 months ago
7 minutes ago, OandO said:

If you were to project along the normal of the triangle, your results for point p would always be accurate (although you'd be discarding the height above / below the plane of the triangle). Projecting along the X, Y or Z axis in world space is an optimisation which assumes point p is co-planar.

As for the closest point between two shapes, I was using this function as a follow up to the GJK algorithm, which takes two convex 3D shapes and returns the point on the surface of each that is closest to the other shape.

Ah assuming point p is coplanar clears things up a lot! I think I got it now, it's just that the book did not explain the situations to how the algorithm is used and it's limitations, or maybe I'm just too dense to catch it. Hence the confusion. Thanks for taking the time to reply all my persistently confused questions ? I haven't reached the GJK part yet but I see it coming up! Hopefully I'll be able to get through the remaining chapter in one piece! Thanks again ?

This topic is closed to new replies.

Advertisement