MonoBehaviour.OnTriggerEnter(Collider)

매뉴얼로 전환

파라미터

otherA Collider involved in this collision.

설명

When a GameObject collides with another GameObject, Unity calls OnTriggerEnter.

OnTriggerEnter happens on the FixedUpdate function when two GameObjects collide. The Colliders involved are not always at the point of initial contact.


Note: Both GameObjects must contain a Collider component. One must have Collider.isTrigger enabled, and contain a Rigidbody. If both GameObjects have Collider.isTrigger enabled, no collision happens. The same applies when both GameObjects do not have a Rigidbody component.


For more information and code samples see API documentation on Collider.OnTriggerEnter.