Why use "is Trigger" for enemy?

I figure out the reason for using “is Trigger” for enemy’s CapsuleCollider2D.
I think some people wonder why use “is Trigger” for enemy’s CapsuleCollider2D even it can work without it?

Use “is Trigger” for enemy’s CapsuleCollider2D is your player can “fall” into the enemy.
In other words, player’s BodyCollider can “touch” enemy.

If we don’t use “is Trigger” for enemy’s CapsuleCollider2D.
You can stand on the enemy by player’s feet Collider.
圖片

1 Like

I agree - it doesn’t really make sense and there’s no need for it. The spikes and slime enemy are physical objects that can’t be breached so they should be regular colliders. It just makes detecting the collision slightly different - using OnCollisionEnter/Exit2D rather than the trigger varieties. This is how I’ve done it and it works properly.

Privacy & Terms