Why "Detect Enemies" of AIPerception not working?

Please help!

Why “Detect Enemies” of AIPerception not working? It is only works if enabled “Detect Neutrals” in AIPerception of AI Character.

How to solve this issue? Is it engine bug? what i need to do additionally ?

Ruslan

Team affiliation for perception has to be setup in c++. To reproduce the effect in a bp-only project, the easiest way to do it is make a blueprint interface to get a Team or Faction variable from the sensed actor, and make a function that compares it to the team/faction of the ai controller’s pawn. Function could simply return a bool indicating whether the teams are hostile, and you could use this bool plus an AND node to combine it with the successfully sensed condition on the branch before you send event to state tree.

Thank you very much! It helped!