If I use Physics.SphereCastAll and it hits a MeshCollider that has it’s Convex property set, the resulting RayCastHit has a triangleIndex of -1.
If however, I use Physics.RayCast, then I get a valid triangle index for the same MeshCollider. Is this a bug, or is there a good reason for this?
The documentation says ‘Triangle index is only valid if the collider that was hit is a MeshCollider.’ - it doesn’t mention convex or concave colliders.