Hello, I’m creating a polygon and I’m going to control it with a rail. The control point coincides with the inside of the polygon. It is formed at the rail checkpoint. Since the polygon is empty, the ray does not realize that it has hit the polygon. How can I fill in the polygon? I request your help.
There’s no notion of volume for a mesh. There’s only a list of faces (triangles), and the intersection function checks if the ray hits at least one face or not.
If you want to know if a point is inside a mesh, you can try to use this function:
if no there is no intersection between ray/triangle then no hit can be detected.
This said, it’s possible to detect if a point is inside a convex hull by testing the point against all planes normal.