Enemy friendly attack for melee

Andy 1 month ago in Melee updated by Dante 4 weeks ago 1

I’ve got the basics System of my side scrolling beat em up set up. My level consist of multiple enemies. However, I have a problem with their attacks. Their attacks can hit each other. I only want them to be able to hit the player. 

I’m using the melee module. 

the ai is set up to follow the player and then attack the player when the player is within a close distance. I used a collider to achieve this. 

Is it possible to exclude hitting other characters other than the player ?


Unity version:
Game Creator version:

I had the same issue.

Here is how to set it up:

1. Add a layer for "enemy"

2. Duplicate the enemies weapon model prefab and keep them seperate from the players weapons.

3. Under the BladeComponent uncheck the "enemy" layer mask