# AI perception GetKnownPerceivedActors issue

**URL:** <https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214>\
**Category:** AI\
**Tags:** perception-component, unreal-engine, Blueprint, question\
**Created:** [October 17, 2017, 8:49am UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214 "2017-10-17T08:49:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![verdigos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@verdigos](https://forums.unrealengine.com/u/verdigos)\
**Post date:** [October 17, 2017, 8:49am UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/1 "2017-10-17T08:49:39Z")

</div>

I’ve tried to use AI perception system. I need to check whether the player was seen by ai character. I added ai perception component to my controller and set up the max age for sight sense ( 5 sec). I created the service in AI behavior tree which checks player visibility. I used node GetKnownPercievedActors in BP. The problem is that when i specify the sense in this node, it starts return all actors the component have seen during game and no matter how long ago it was. Looks like ai perception component never forgets. In the same time AI debug displays that everything looks good and actors are being forgetten as it should. But when i set sense to None , GetKnownPercievedActors returns right actors.  
Is there any way to fix it, except setting sense to None in node?  
Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8635262b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8635262b](https://forums.unrealengine.com/u/anonymous_user_8635262b)\
**Post date:** [October 17, 2017, 9:20am UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/2 "2017-10-17T09:20:46Z")

</div>

How about using “Get Currently Perceived Actors” instead?

---

<div class="post-metadata">

**Author:** ![verdigos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@verdigos](https://forums.unrealengine.com/u/verdigos)\
**Post date:** [October 17, 2017, 3:48pm UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/3 "2017-10-17T15:48:55Z")

</div>

Thanks. But it isn’t that i need. It returns actors that are sensed right now. I need actors that are in “memory”.

---

<div class="post-metadata">

**Author:** ![FakeEnema](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FakeEnema](https://forums.unrealengine.com/u/FakeEnema)\
**Post date:** [July 14, 2018, 3:32am UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/4 "2018-07-14T03:32:01Z")

</div>

He said he already set the max age to 5 seconds. I’m having the same problem. I have Max Age set to 10 seconds, but it never forgets them.

---

<div class="post-metadata">

**Author:** ![Ambience\_Lee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ambience\_Lee](https://forums.unrealengine.com/u/Ambience_Lee)\
**Post date:** [August 11, 2018, 3:19am UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/5 "2018-08-11T03:19:53Z")

</div>

It will never forget anything as I have tested in 4.20, just use the age as a filter whenever you need to.

---

<div class="post-metadata">

**Author:** ![shift12392](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shift12392](https://forums.unrealengine.com/u/shift12392)\
**Post date:** [June 14, 2019, 1:36pm UTC](https://forums.unrealengine.com/t/ai-perception-getknownperceivedactors-issue/407214/6 "2019-06-14T13:36:26Z")

</div>

我也碰到了这个问题，这或者是个BUG，或者是开发人员有意为之。  
你看了代码就知道了，设置不设置SenseToUse的判断条件不一样。  
UE4.22。
