# Rotating AI Smoothly? Vinterp to doesn't seem to work :S

**URL:** <https://forums.unrealengine.com/t/rotating-ai-smoothly-vinterp-to-doesnt-seem-to-work-s/501172>\
**Category:** AI\
**Tags:** unreal-engine, UE4-27, question\
**Created:** [February 23, 2022, 12:51am UTC](https://forums.unrealengine.com/t/rotating-ai-smoothly-vinterp-to-doesnt-seem-to-work-s/501172 "2022-02-23T00:51:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![isikdev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/isikdev/32/991020_2.png) [@isikdev](https://forums.unrealengine.com/u/isikdev)\
**Post date:** [February 23, 2022, 12:51am UTC](https://forums.unrealengine.com/t/rotating-ai-smoothly-vinterp-to-doesnt-seem-to-work-s/501172/1 "2022-02-23T00:51:33Z")

</div>

Hi fellow UE family,

I am trying to achieve a basic rotation before my enemy AI plays an attack animation. Here is what I currently have going:

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/6/c66c77cd76fbe78cf8e73857cb3975b8cf87131a.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/6/c66c77cd76fbe78cf8e73857cb3975b8cf87131a.mp4)

And here is the code I am using for the enemy to rotate before attacking:

 ![Screenshot 2022-02-23 034744](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/d/e1d02a0c40d2e92efa1a56f37cd1517bef2384f7.png)

How can I adjust it so the enemy rotates smoothly instead of snapping before attacking? Appreciate any help! Keep safe.

---

<div class="post-metadata">

**Author:** ![MilionX](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/milionx/32/1194703_2.png) [@MilionX](https://forums.unrealengine.com/u/MilionX)\
**Post date:** [February 23, 2022, 1:04am UTC](https://forums.unrealengine.com/t/rotating-ai-smoothly-vinterp-to-doesnt-seem-to-work-s/501172/2 "2022-02-23T01:04:18Z")

</div>

should put this in tick event.

---

<div class="post-metadata">

**Author:** ![isikdev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/isikdev/32/991020_2.png) [@isikdev](https://forums.unrealengine.com/u/isikdev)\
**Post date:** [February 23, 2022, 1:14am UTC](https://forums.unrealengine.com/t/rotating-ai-smoothly-vinterp-to-doesnt-seem-to-work-s/501172/3 "2022-02-23T01:14:44Z")

</div>

Hey, thanks for the tip! I’ve actually solved it, and for anyone wondering how, I broke the function down and decided to rotate the enemy using a timeline and a rotator, and finally applying it to the attack animations thru a anim notify state. Here is how it looks right now, for anyone interested:

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/d/75d5c4bab8e031d5dd808371acda59242589e5f3.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/d/75d5c4bab8e031d5dd808371acda59242589e5f3.mp4)

And this is what I did:

 ![Screenshot 2022-02-23 041408](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/f/affcbf8b8bdb5d5103f880ca5bb7bcf2b9f83f95.png)

Have a great day/night everyone!
