Version: 2022.3
言語: 日本語


class in UnityEngine




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

Note: The contact points are in world-space.

See Also: ContactPoint.


articulationBodyThe ArticulationBody of the collider that your GameObject collides with (Read Only).
bodyThe Rigidbody or ArticulationBody of the collider that your Component collides with (Read Only).
colliderヒットした Collider 情報を返します(読み取り専用)
contactCountGets the number of contacts for this collision.
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).
relativeVelocity衝突した 2 つのオブジェクトの相対的な速度(読み取り専用)
rigidbodyヒットした Rigidbody (読み取り専用)。ヒットしたオブジェクトに Rigidbody がアタッチされていない場合、null を返します。
transformヒットした Transform 情報を返します。(読み取り専用)

Public 関数

GetContactGets the contact point at the specified index.
GetContactsRetrieves all contact points for this collision.