Problem with using AIPerception's Team Sense

Hi again,
I finally found out! :slight_smile:
After setting the TeamId, you must update the listener.
So, in BeginPlay() for example:


SetGenericTeamId( FGenericTeamId( 1 ) );
UAIPerceptionSystem::GetCurrent( GetWorld() )->UpdateListener( *PerceptionComponent );

The issue was that the perception component of each AI was registered to the global perception system when the team id of each enemy was not set.
Hope this helps!

3 Likes