Raycast 'hit.distance' sometimes returns as zero...

Got a standard raycast and a standard Debug.DrawRay.

I also have a standard ‘Print (hit.distance)’ which returns the distance from the origin of the ray to whatever it ‘collides’ with.

Here comes the problem: Sometimes hit.distance returns as zero, when it is quite clearly hitting an object.

Any reason for this? Any way to fix it?

The objects & colliders in my scene are imported from Blender, but they seem to behave perfectly well.

Your help will guarantee you a spot in Valhalla.

Tom :slight_smile:

Can you debug the name of the object it hits with? Could it be it is hitting its own collider?