Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

RaycastHit2D.rigidbody

var rigidbody: Rigidbody2D;
Rigidbody2D rigidbody;
rigidbody as Rigidbody2D

Description

The Rigidbody2D attached to the object that was hit.

See Also: Rigidbody2D class.