# Ai Perception problem (Solved)

**URL:** <https://forums.unrealengine.com/t/ai-perception-problem-solved/508904>\
**Category:** AI\
**Tags:** AI-Perception, unreal-engine, UE4-26, question\
**Created:** [March 22, 2022, 3:18pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904 "2022-03-22T15:18:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [March 22, 2022, 3:18pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/1 "2022-03-22T15:18:53Z")

</div>

Hello

I’ve setup an AI but the AiPerception never dissapear from the spot that player was detected, if player goes to the position that was detected AI will run towards him even if is not in range of detection.

 ![AI_Perception](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/1/2/512a94f625e143de12e3fb4c81fd269eeb5d6ecf.png)  
 ![AI_Perception_01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/f/b4f1ef1a2de6b2222c820244f295ed2093061265.jpeg)

---

<div class="post-metadata">

**Author:** ![Fraps2020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fraps2020/32/460865_2.png) [@Fraps2020](https://forums.unrealengine.com/u/Fraps2020)\
**Post date:** [March 22, 2022, 3:34pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/2 "2022-03-22T15:34:01Z")

</div>

Hey Napimel,

the issue is with Max Age being 0.0 – that means that you stimuli is never forgotten ( [AI Perception | Unreal Engine Documentation](https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/ArtificialIntelligence/AIPerception/)) . So, you need to specify for how long you want your AI to remember about having seen the player.

Hope that helps.

Cheers

f

---

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [March 22, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/3 "2022-03-22T15:44:45Z")

</div>

Hey Fraps, sadly i tried to put Max to 1 and still doesnt expire, keep counting or stay at 0 forever forgot to mention that in post.

---

<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:** [March 22, 2022, 3:49pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/4 "2022-03-22T15:49:39Z")

</div>

Hi, you also set your AutoSuccessRange to 500, meaning at least that if the player stays closer than 500 units (5 meters) to the last spotted location, the AI will still see it.

---

<div class="post-metadata">

**Author:** ![Fraps2020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fraps2020/32/460865_2.png) [@Fraps2020](https://forums.unrealengine.com/u/Fraps2020)\
**Post date:** [March 22, 2022, 3:53pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/5 "2022-03-22T15:53:57Z")

</div>

Indeed. Try setting auto success to -1 (means no auto success) and see if that solves the issues.

---

<div class="post-metadata">

**Author:** ![Napimel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napimel](https://forums.unrealengine.com/u/Napimel)\
**Post date:** [March 22, 2022, 4:04pm UTC](https://forums.unrealengine.com/t/ai-perception-problem-solved/508904/6 "2022-03-22T16:04:09Z")

</div>

Yes, worked as i wanted, i set auto success to -1 and Max Age to 3, now after 3 second Perception Ai Sight will expire and the AI wont come to the place where player was detected if is not detected again.

Thank you all for help
