OnTriggerEnter or OnCollisionEnter? When Should You Use Them & How?

OnTriggerEnter = Passthrough Collisions

OnCollisionEnter = Hard Collisions


How Do I Use Them?

Example (Before Collision Script Added)

This script will be attached to the “Enemy“ game object.

Make sure to add the tag “Player” to the player object.

Example (After Collision Script Added)

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!