Hey all,
So when we added the box collider to the enemy, to check when the enemy has to flip, in the case where the enemy hits a wall, why does the OnTriggerExit2D works? is’t the walls and ground have the same collider?
So if the enemy was on a floating platform for example, this makes sense, because the box collider will exit the platform’s collider and trigger the OnTriggerExit2D method. But why does the method work when there is a wall?
Thanks