RaycastHit.Rigidbody

The Rigidbody of the collider that was hit.

RaycastHit.Rigidbody

Properties

Property NameDescription
Raycast Hit RaycastHit
Rigidbody Output hit Rigidbody

Remarks

If the collider is not attached to a rigidbody then it is null.