raycastAll returns instance more than once

I don’t know if this is unintended behavior or not but I wanted to report it. If you do raycastAll against a mesh (maybe generic colliders as well but I haven’t tested), it may return the mesh multiple times, for me once when entering its collider and once when leaving it. Since it is an external mesh I do not know if it has double face collision. Either way this seems a bit weird.

Hi @CaseyDeCoder! I think there is also a GitHub report about the same issue. Please check this and share your findings there too.

1 Like

Alright, so currently this is not possible.

I have made a new PR to Ammo library bindings. This allows to set filtering flags on raycasts, which in turn allows to ignore the backfaces. I will update the github issue too.

1 Like