RaycastHit2D.Rigidbody

The Rigidbody2D of the Collider2D that was hit.

RaycastHit2D.Rigidbody

Properties

Property NameDescription
Raycast Hit 2D RaycastHit2D
Rigidbody Output hit Rigidbody2D

Remarks

If the Collider2D is not attached to a Rigidbody2D then it is null.