# AI perception to only include player character

**URL:** <https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677>\
**Category:** AI\
**Tags:** unreal-engine, question\
**Created:** [December 31, 2024, 5:19pm UTC](https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677 "2024-12-31T17:19:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilpo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dilpo](https://forums.unrealengine.com/u/dilpo)\
**Post date:** [December 31, 2024, 5:19pm UTC](https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677/1 "2024-12-31T17:19:40Z")

</div>

![Screenshot 2024-12-31 111143](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/6/4c67783338cab58bf5a786af3a147401baf0de81.png)  
Hello. I am using the above setup and I believe this would lead to many casts being performed as there will be many ai pawns in a small area coming in and out of view. A possible solution I have considered is using a blueprint interface that only the player has but I figure there might be a better solution.

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [December 31, 2024, 6:37pm UTC](https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677/2 "2024-12-31T18:37:01Z")

</div>

Easiest is probably to set the player character as an enemy and the other NPCs as friendlies (or neutrals,) and configure the AI Sense to only detect enemies.

Although if you have no C++ in your project, note the comment:

> For Blueprints, you can use the **Detect Neutrals** option to detect all Actors, then use **Tags** to filter out Actor types.

---

<div class="post-metadata">

**Author:** ![dilpo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dilpo](https://forums.unrealengine.com/u/dilpo)\
**Post date:** [December 31, 2024, 7:41pm UTC](https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677/3 "2024-12-31T19:41:10Z")

</div>

Thanks, I keep forgetting to look into tag usage.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [January 30, 2025, 7:41pm UTC](https://forums.unrealengine.com/t/ai-perception-to-only-include-player-character/2252677/4 "2025-01-30T19:41:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
