Skip to content

API > Collision


Collision⚓︎

Describes a collision. Unity Collision

Members⚓︎

Properties⚓︎

Name Description
Collision.colliderProperty The Collider we hit (Read Only).
Collision.contactCountProperty Gets the number of contacts for this collision.
Collision.contactsProperty The contact points generated by the physics engine. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead.
Collision.gameObjectProperty The GameObject whose collider you are colliding with. (Read Only).
Collision.impulseProperty The total impulse applied to this contact pair to resolve the collision.
Collision.relativeVelocityProperty The relative linear velocity of the two colliding objects (Read Only).
Collision.rigidbodyProperty The Rigidbody we hit (Read Only). This is nil if the object we hit is a collider with no rigidbody attached.
Collision.transformProperty The Transform of the object we hit (Read Only).

Methods⚓︎

Name Description
Collision.GetContact(index) Method Gets the contact point at the specified index.