Collider

I have a question regarding the collider thing at the end of the video. I don’t understand the enemy bumping in the wall activates the ontriggerexit. The additional BoxCollder attached to the enemy doesn’t leave the foreground collider when it reaches the wall. I’m not saying that on my project it doesn’t have the same effect as in the course, I just don’t understand because the collider doesn’t exit the foreground collider.

Thanks

Hi,

Welcome to our community! :slight_smile:

OnTriggerExit gets called only if a trigger collider is involved. I don’t know to which colliders you are referring but if it’s the terrain collider, we are dealing with an edge collider in this case. Once the other collider moves beyond the edge and appears to be inside the wall, it actually exited the edge collider. There is no inner part.

Is this what you wanted to know?


See also:

yeah, that clarifies it. thank you very much

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

Privacy & Terms