Version: 2021.2
言語: 日本語

Collision

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).
impulse衝突を解消するために互いの接触に適用される合計のインパルス
relativeVelocity衝突した 2 つのオブジェクトの相対的な速度(読み取り専用)
rigidbodyヒットした Rigidbody (読み取り専用)。ヒットしたオブジェクトに Rigidbody がアタッチされていない場合、null を返します。
transformヒットした Transform 情報を返します。(読み取り専用)

Public 関数

GetContactGets the contact point at the specified index.
GetContactsRetrieves all contact points for this collision.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961