# Team Perception Affiliation Unreal Engine 5

**URL:** <https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257>\
**Category:** AI\
**Tags:** Perception, unreal-engine\
**Created:** [May 11, 2022, 4:40am UTC](https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257 "2022-05-11T04:40:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Breaker\_North](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Breaker\_North](https://forums.unrealengine.com/u/Breaker_North)\
**Post date:** [May 11, 2022, 4:40am UTC](https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257/1 "2022-05-11T04:40:55Z")

</div>

Can anybody help me set this up? Any of the C++ documentation to help with it is at least 5 years old and never works. I need to be able to set GenericTeamID on my AI running around. If they not on same team return hostile. Been weeks

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [May 11, 2022, 5:54pm UTC](https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257/2 "2022-05-11T17:54:49Z")

</div>

Hi, you could follow this here [How do I use the AI Perception Teams?](https://forums.unrealengine.com/t/how-do-i-use-the-ai-perception-teams/120837)

Generally speaking, the system uses the `IGenericTeamAgentInterface` to extract the team information from the actors you want to perceive and the AI controller that the AI perception component belongs to. It then uses a function that takes two `FGenericTeamId` (which it extracts via the interface) as input and outputs the affiliation between the two.

That means what you would need to do, is implement the `IGenericTeamAgentInterface` in any actor you want to perceive, optionally overwrite it also in the AI controller and then you need to create your own attitude solver function and tell the system to use that via the `FGenericTeamId::SetAttitudeSolver` function.

AFAIK the default attitude solver function will return friendly if both have the same team, and hostile otherwise. But if the actor does not implement the `IGenericTeamAgentInterface`, then it will return neutral.

---

<div class="post-metadata">

**Author:** ![dMn\_91](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dMn\_91](https://forums.unrealengine.com/u/dMn_91)\
**Post date:** [June 27, 2023, 9:23am UTC](https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257/3 "2023-06-27T09:23:52Z")

</div>

Hello. Should I implement `IGenericTeamAgentInterface` on player pawn, bot pawns and also call SetGenericTeamId() on ControllerAI? Also I need sync bot teamId with its controller teamID for work properly?

---

<div class="post-metadata">

**Author:** ![Breaker\_North](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Breaker\_North](https://forums.unrealengine.com/u/Breaker_North)\
**Post date:** [October 10, 2025, 4:08am UTC](https://forums.unrealengine.com/t/team-perception-affiliation-unreal-engine-5/554257/4 "2025-10-10T04:08:24Z")

</div>

I made a plugin that exposes that part of the perception system to blueprint

> **[Friend or Foe Ai Perception System Extender (Team Enabler)](https://www.fab.com/listings/d92234fb-18de-402c-b209-b05068b1d47c)**
>
> This plugin gives you access to two Blueprint exposed variables for enabling Team Perception in the Perception system as well exposing the option for AI to use PlayerStates. Great for GAS systems that use the player state to host the ability system....
