# Troubles with a task that makes an npc turn left and right 

**URL:** <https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916>\
**Category:** Blueprint\
**Tags:** behavior-tree-task, unreal-engine, question\
**Created:** [January 21, 2026, 5:26pm UTC](https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916 "2026-01-21T17:26:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fightforthepipe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fightforthepipe](https://forums.unrealengine.com/u/fightforthepipe)\
**Post date:** [January 21, 2026, 5:26pm UTC](https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916/1 "2026-01-21T17:26:02Z")

</div>

My UE version is 5.5.4.

So here is the deal: i have a loop that makes an npc turn towards one direction (let’s say it turns to the right) then it waits a few seconds, after that it turns the other direction. Then it starts over.

I can make the character snap to the desired direction and the loop would work, but the big thing is that i want to make the transition smooth and gradual.

It works to a degree. Because when it fires my character turns, but it only does so for 1 frame. If you would look at the sreenshot, I tried the thing with the ABS to set gradual rotation, but it kills the loop and it still lasts only 1 frame.

Any ideas anyone?

P.S. the goal for now is to stay within a BTT and make it work. Making it pretty would come later.

> **Blueprint pic (it’s a long boy, i hope it’ll scale alright)**
>
> ![F23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/f/38fb0ca63a15e3c37e09147bc5cda9db4d7e97d5.png)

---

<div class="post-metadata">

**Author:** ![fightforthepipe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fightforthepipe](https://forums.unrealengine.com/u/fightforthepipe)\
**Post date:** [January 22, 2026, 7:45am UTC](https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916/2 "2026-01-22T07:45:08Z")

</div>

Solved it via a timer. I have two dupe functions each for opposed direction, it works.

If you’re reading this and wondering, yes you could redo it into one function and make it pretty.

(would have to do 1 pic at a time, because reasons ¯\_(ツ)\_/¯)

> **Timer**
>
> ![Снимок экрана (905)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/3/e933ad33b831d1738a6eb983ce443abbc38b606e.png)

---

<div class="post-metadata">

**Author:** ![fightforthepipe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fightforthepipe](https://forums.unrealengine.com/u/fightforthepipe)\
**Post date:** [January 22, 2026, 7:45am UTC](https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916/3 "2026-01-22T07:45:38Z")

</div>

> **Function**
>
> ![Снимок экрана (908)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/3/423a90e65d9502af789996947ffbfac61fcd84e7.png)

---

<div class="post-metadata">

**Author:** ![fightforthepipe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fightforthepipe](https://forums.unrealengine.com/u/fightforthepipe)\
**Post date:** [January 22, 2026, 7:46am UTC](https://forums.unrealengine.com/t/troubles-with-a-task-that-makes-an-npc-turn-left-and-right/2693916/4 "2026-01-22T07:46:13Z")

</div>

> **Clearing the timer**
>
> ![Снимок экрана (907)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/7/cc7ace477269c2e3c00818d5f0cd6d48c1d5fcb6.png)
