1) Project the position of the point onto the plane defined by the three points of the triangle.
2) Check if that projected point is within the triangle by summing the areas of the three triangles formed by connecting lines from the projected point to each vertex of the triangle. ( I have another video on this, see below)
3) If the projected point is within the triangle and the distance from the point to the projected point is below a certain threshold value then the point is colliding with the triangular face.
Projecting a point to a plane: • Projecting a Point to a Plane in 3D
Determining if a point lies within a triangle: • Triangle Collision by Area Method
Collision detection in action: • 3D Platformer in p5js
Смотрите видео 3D collision between a point and a triangular face онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь morejpeg 15 Ноябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,069 раз и оно понравилось 93 людям.