Collision

class in UnityEngine

Cambiar al Manual

Descripción

Describe una colisión.

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

Note: The contact points are in world-space.

See Also: ContactPoint.

Variables

colliderEl Collider con el que chocamos (Read Only).
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).
impulseEl impulso total aplicado a este par de contacto para resolver la colisión.
relativeVelocityLa velocidad lineal relativa de los dos objetos que colisionan (Read Only).
rigidbodyEl Rigidbody con el que chocamos (Read Only). Toma valor null si el objeto con el que chocamos es un Collider sin un Rigidbody ligado a él.
transformEl Transform del objeto con el que chocamos (Read Only).

Funciones Públicas

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