RaycastHit Question

When I cast a ray and it hits an object, how can I determine the specific face of the object that was hit?

At the moment you can only get back the intersection point, normal, distance and object that was hit.

Thanks, Joe.

Yeah, I’ve been playing with RaycastHit and find the feedback that it provides to be almost complete, minus this one aspect.

It would be great if I could cast a ray and get not only the name of the mesh with which the ray collided, but a references to the specfic face as well. Is there any chance that this will be supported in a future release of Unity?

Would it be possible to place invisible colliders on the faces? These colliders would function as sensors, much like the sensors in the laser tag game.

Tom

That’d still be too much work. I need every face on the mesh, which could be several thousand faces, to be able to return this information.

It sounds like the upcoming mesh-level access features might allow this.