ray | The 3D ray defining origin and direction to test. |
distance | Maximum distance over which to cast the ray. |
layerMask | Filter to detect colliders only on certain layers. |
Cast a 3D ray against the colliders in the scene returning the first collider along the ray.