Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Collision

Collision

Understanding colliders versus triggers, colliders are solid while triggers let objects pass through them

When Collision events will occur

onCollisionEnter and onCollisionExit functions will occur in the following situations of objects coming into contact:

Our Object Other Object
Object with a Solid Collider and no Rigidbody Object with a Solid Collider and Non-Kinematic Rigidbody
Object with a Solid Collider and a Non-Kinematic Rigidbody Object with a Solid Collider and Kinematic OR Non-Kinematic Rigidbody

When Trigger events will occur

onTriggerEnter and onTriggerExit functions will occur in the following situations of objects coming into contact:

Our Object Other Object
Object with a Trigger Collider and no Rigidbody Object with a Kinematic OR Non-Kinematic Rigidbody and a Solid OR Trigger Collider
Object with a Trigger Collider and a Kinematic OR Non-Kinematic Rigidbody Object with a Solid OR Trigger Collider

Learn more about Rigidbodies

Articles

Tags
Was this article helpful to you? Yes No

How can we help?