# Pawn sensing problem that I have no idea how to fix

**URL:** <https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179>\
**Category:** AI\
**Tags:** unreal-engine, pawn-sensing, UE4, Blueprint, question\
**Created:** [May 15, 2018, 5:45pm UTC](https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179 "2018-05-15T17:45:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanthom100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ryanthom100](https://forums.unrealengine.com/u/ryanthom100)\
**Post date:** [May 15, 2018, 5:45pm UTC](https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179/1 "2018-05-15T17:45:59Z")

</div>

Basically, I am creating a horror game and my enemy has a chase ai with pawn sensing and pawn perception. I have been following tutorials and don’t know why this bug is occurring. When my character is in the sight radius of the enemy’s pawn sensing it will not react and start to chase him and then sometimes it will. I have been trying to figure the issue out for around 4 hours and cannot find a solution to the problem. Another issue as well is how when I go out of the enemy’s pawn sensing radius distance it still chases me.

---

<div class="post-metadata">

**Author:** ![KaidoomDev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kaidoomdev/32/977996_2.png) [@KaidoomDev](https://forums.unrealengine.com/u/KaidoomDev)\
**Post date:** [May 15, 2018, 8:19pm UTC](https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179/2 "2018-05-15T20:19:11Z")

</div>

It keeps chasing you because you didn’t set the Actor target to Null when the target is not in sight, I would assume that’s the issue, for the first problem I would just print a message when a target is found to see if that’s the issue or your AI tree.

---

<div class="post-metadata">

**Author:** ![Andrei\_Despinoiu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andrei\_Despinoiu](https://forums.unrealengine.com/u/Andrei_Despinoiu)\
**Post date:** [May 16, 2018, 12:45am UTC](https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179/3 "2018-05-16T00:45:39Z")

</div>

The first issue sounds like you have a task that doesn’t have a “Finish Execute” node and stays stuck on it. Debug its behaviour tree, see where it’s stuck.

Also, if you have a “TargetActor” that the AI is supposed to chase, make sure it’s of type “Actor”: [https://youtu.be/nshHCycft4A?t=1837](https://youtu.be/nshHCycft4A?t=1837) (hear that “very important note here”? Yeah…).

The second issue sounds like you’re not making the AI “forget” he saw you once you exit its line of sight (after a few seconds, preferably). There’s a “Clear Blackboard Value” node with which you can clear the “TargetActor” mentioned above.

---

<div class="post-metadata">

**Author:** ![ryanthom100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ryanthom100](https://forums.unrealengine.com/u/ryanthom100)\
**Post date:** [May 16, 2018, 2:46pm UTC](https://forums.unrealengine.com/t/pawn-sensing-problem-that-i-have-no-idea-how-to-fix/425179/4 "2018-05-16T14:46:42Z")

</div>

Hi I have fixed the second problem I was having but I still can’t find a solution to the first problem
