# AI actions have unneccessary delay

**URL:** <https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117>\
**Category:** AI\
**Tags:** Behavior-Tree, unreal-engine, Blueprint, question\
**Created:** [March 4, 2015, 10:50am UTC](https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117 "2015-03-04T10:50:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1f559868](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1f559868](https://forums.unrealengine.com/u/anonymous_user_1f559868)\
**Post date:** [March 4, 2015, 10:50am UTC](https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117/1 "2015-03-04T10:50:18Z")

</div>

I made a simple Character AI that follows the player around. Below is the Behavior Tree it uses. ChasePlayer looks up players current position and Move To moves to that position. Movement works as planned; however after moving to position the AI Character stays still for 2-4 seconds instead of starting the sequence immediately again.

**How can I remove the delay in Sequence?**

![32170-behaviortree.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/1/38176b9ab919c424745152b54972df6d115dac33.png)

---

<div class="post-metadata">

**Author:** ![MieszkoZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MieszkoZ](https://forums.unrealengine.com/u/MieszkoZ)\
**Post date:** [March 4, 2015, 11:47am UTC](https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117/2 "2015-03-04T11:47:46Z")

</div>

There’s no delay (just checked with [my AI Tutorial](https://wiki.unrealengine.com/Unreal_Engine_AI_Tutorial_-_3_-_Random_Wandering)) so the delay you’re experiencing must come from `ChasePlayer` or from outside of the BT. Have you used BT debugger? Does it show BT handing on `Move To` even after finishing the move?

Cheers,

–mieszko

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1f559868](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1f559868](https://forums.unrealengine.com/u/anonymous_user_1f559868)\
**Post date:** [March 4, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117/3 "2015-03-04T13:26:20Z")

</div>

Yeah - after debugging I noticed MoveTo is still being handled for some seconds even after reaching destination. I added one second timer to it and now it works better. It’ll do until I’ll figure out a smoother way to do it.

![32188-new.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/7/2b7d5ac8ab273405b06070c1e798ac9cc2118fae.png)

**EDIT:** I realized where the delay was coming from. The AI couldn’t reach the z-location it got from my actor. That’s why it was staying put in the location for a while trying to reach it. Don’t even need the timer anymore.

---

<div class="post-metadata">

**Author:** ![mofo09](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mofo09](https://forums.unrealengine.com/u/mofo09)\
**Post date:** [June 16, 2022, 4:35pm UTC](https://forums.unrealengine.com/t/ai-actions-have-unneccessary-delay/309117/4 "2022-06-16T16:35:31Z")

</div>

How did you resolve this?
