Alright I have this up and running.
I’ve never used the AI Perception component, but first thing I suspected as soon as executed your game is that the enemies seem to be sensing each other and they should only sense the player and that’s what’s happening. That’s why you get that random behavior from the enemies.
In the AI Perception Component there are 3 checkboxes under AI Perception->Sensing config->Detect by Affiliation. Both enemies and the player are seen as “Neutrals”. Uncheck this and you will notice that the enemies stop moving.
Next thing I did , was duplicate your map and delete all enemies but one. Then I moved towards the enemy but nothing happened. The enemy won’t move. Then I activated debug tools for AI (check this link AI Debugging | Unreal Engine Documentation.
I activated the AI Perception debug (numpad 4 after pressing ’ (apostrophe)) . This shows the AI perception radius and I noticed it is facing backwards the enemy. I then moved the player to the back of the AI enemy and he started moving.
This is happening because you have the mesh pointing in the wrong direction. Open the BP_Enemy->Viewport. Notice the blue arrow? That’s the direction your character should be facing.
Now, if you change this, the enemy will move backwards, but the sensing will be correct. You will have to fix this.
So first things you have to investigate:
- Why are the enemies sensing enemies and not only the player?
- Rotate your mesh 180 degrees in the BP_Enemy and fix the backwards movement
PS: Let me know if you need more help