ncollide icon indicating copy to clipboard operation
ncollide copied to clipboard

3D: ray casts which touch a TriMesh edge report intersection with a backface

Open clbarnes opened this issue 5 years ago • 1 comments

Here's a repo demonstrating the issue: https://github.com/clbarnes/ncollide-issue-graze

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. ncollide3d 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 https://github.com/rustsim/ncollide/issues/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.

clbarnes avatar May 20 '20 12:05 clbarnes

Yeah, launching multiple rays sounds like a safe alternative for the time being.

sebcrozet avatar Feb 01 '21 17:02 sebcrozet