# Using Given AI Perception from AIController but Not Quite Wokring

**URL:** <https://forums.unrealengine.com/t/using-given-ai-perception-from-aicontroller-but-not-quite-wokring/455113>\
**Category:** AI\
**Tags:** aiperception, Perception, aicontroller, unreal-engine, question, CPP\
**Created:** [September 10, 2019, 4:53am UTC](https://forums.unrealengine.com/t/using-given-ai-perception-from-aicontroller-but-not-quite-wokring/455113 "2019-09-10T04:53:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BBAGWANG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BBAGWANG](https://forums.unrealengine.com/u/BBAGWANG)\
**Post date:** [September 10, 2019, 4:53am UTC](https://forums.unrealengine.com/t/using-given-ai-perception-from-aicontroller-but-not-quite-wokring/455113/1 "2019-09-10T04:53:07Z")

</div>

I found that AIController Class already had AIPerceptionComponent named PerceptionComponent.  
So I use this code

```
    ANPC_AIController::ANPC_AIController()
    {
    	PerceptionComponent = CreateOptionalDefaultSubobject<UAIPerceptionComponent>(TEXT("AIPerception"));
    }

```

and PerceptionComponent now shows in Blueprint class which I just made from C++ Class.  
I’m trying to add Senses Config for add AI Sight config.  
it goes right in but Detection by Affiliation category don’t have any items in it.

In normal situation there are “Detect Enemy”, “Detect Neutral”, “Detect Friendlies”  
any ideas?

 ![286867-123.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/0/a508bfd85fe2b43c049be501a4b0d49edf20c292.png)

---

<div class="post-metadata">

**Author:** ![BBAGWANG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BBAGWANG](https://forums.unrealengine.com/u/BBAGWANG)\
**Post date:** [September 10, 2019, 5:26am UTC](https://forums.unrealengine.com/t/using-given-ai-perception-from-aicontroller-but-not-quite-wokring/455113/2 "2019-09-10T05:26:18Z")

</div>

I think I just found the answer : [Unreal Engine 4 C++/Blueprint AI Basics Part 1: AI Bot Perception and Base Setup - YouTube](https://www.youtube.com/watch?v=P12uWSFVSIc)
