Collision

class in UnityEngine

매뉴얼로 전환

설명

Describes a collision.

Collision information is passed to Collider.OnCollisionEnter, Collider.OnCollisionStay and Collider.OnCollisionExit events.

Note: The contact points are in world-space.

See Also: ContactPoint.

변수

colliderThe Collider we hit (Read Only).
contactsThe contact points generated by the physics engine. You should avoid using this as it produces memory garbage. Use GetContact or GetContacts instead.
gameObjectThe GameObject whose collider you are colliding with. (Read Only).
impulseThe total impulse applied to this contact pair to resolve the collision.
relativeVelocityThe relative linear velocity of the two colliding objects (Read Only).
rigidbodyThe Rigidbody we hit (Read Only). This is null if the object we hit is a collider with no rigidbody attached.
transformThe Transform of the object we hit (Read Only).