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

OnTriggerEnter = Passthrough Collisions

OnCollisionEnter = Hard Collisions

[Note]

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!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Reed

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!