Hello! I want to use a volume and populate it with points, and for each point decide if it is inside or outside the mesh. This is for a 3D Nav-Volume that I am creating. I have a max distance, so most line traces from inside the mesh rightly return false because there is no hit when the line trace goes through the back face. The problem is that right now, I have the issue of nodes close inside the mesh, close to a concave corner will go through the backface, and then hit a front face and therefore say that the node should exist. Illustration below:
And in practice:
The camera is inside the mesh, and the ones below the concave corner should be identified as invalid points.
What I would love is if I could simply detect a hit for the backface, and I could just check if the dot with the line trace direction is > 0. in that case, I would know that I am hitting a backface. Is something like that possible?
The other naive solution I can think of is doing a flood fill of the nodes (they are correctly connected), and I send a line trace between each node, and if is blocked from each connection, the node is pruned. However, this seems unnecessarily complicated for the problem at hand.
Would be very thankful for a solution!
As a bonus, if it is relevant, My mesh uses the complex collision as its simple collision.