class in UnityEngine
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
Collision details returned by 2D physics callback functions.
The collisions details are returned by MonoBehaviour.OnCollisionEnter2D, MonoBehaviour.OnCollisionStay2D and MonoBehaviour.OnCollisionExit2D callbacks. It details which Collider2D and Rigidbody2D pairs are involved in the collision as well as contact points where the Collider2D meet.
|The incoming Collider2D involved in the collision with the otherCollider.
|Gets the number of contacts for this collision.
|The specific points of contact with the incoming Collider2D. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead.
|Indicates whether the collision response or reaction is enabled or disabled.
|The incoming GameObject involved in the collision.
|The other Collider2D involved in the collision with the collider.
|The other Rigidbody2D involved in the collision with the rigidbody.
|The relative linear velocity of the two colliding objects (Read Only).
|The incoming Rigidbody2D involved in the collision with the otherRigidbody.
|The Transform of the incoming object involved in the collision.