Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

Collision2D.otherRigidbody

public Rigidbody2D otherRigidbody;

Description

The other Rigidbody2D involved in the collision with the rigidbody.

This may be null if the Collision2D.otherCollider is not attached to a Rigidbody2D.

Additional resources: Collider2D and Rigidbody2D.