[Question]

Hey guys, i need your help in this question, as you did in this video and enemy life and death video, here’s the situation:
1- player life and death: the player collider was not a trigger but the enemy projectile collider was a trigger, and the EnterCollider2D function is set inside player
2- Enemy life and death: the enemy collider was a trigger but the player projectile was not, and the EnterCollider2D function is set inside enemy
So, i need a clarification about this case, why are the case is reversed and we get the right behaviour, knowing that i tried to make player collider as trigger and enemy collider as not but then player crashed by his own bullets, why is that?

Hi Solaiman,

Trigger colliders don’t interact with one another. Only non-trigger with trigger, and non-trigger with non-trigger colliders do. Non-trigger colliders “physically” interact with one another. To make a trigger do something, we need a method.

The player does not get destroyed automatically but via a method call in which we defined the behaviour. If the method does not get called, the player will not get destroyed.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms