Ray casts which touch a TriMesh edge report intersection with a backface
clbarnes opened this issue · 1 comments
This issue was originally reported on ncollide: dimforge/ncollide#335
Imagine Santa's sled knocking some snow off the top of a roof. It could be argued that no impact happened, or it could be argued that the impact happened with the edge. parry3d reports that Santa collided with the inside of the house.
This is important for using ray casting to determine whether a point is inside a mesh. As per dimforge/ncollide#317, I am casting a ray and checking whether it intersected with a backface. In the motivating example, a point nowhere near the mesh happens to cast a ray which skims a ridge in the mesh: due to this issue, a backface intersection is reported.
The issue is demonstrated here (on the parry
branch): https://github.com/clbarnes/ncollide-issue-graze/tree/parry
Note that the motivating example for this, containment checks for points in meshes, is now potentially made obsolete by contains_local_point
actually doing a solid containment check if the pseudonorms are calculated.