# Smooth character rotation via mouse cursor

**URL:** <https://forums.unrealengine.com/t/smooth-character-rotation-via-mouse-cursor/601840>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [July 10, 2022, 8:33pm UTC](https://forums.unrealengine.com/t/smooth-character-rotation-via-mouse-cursor/601840 "2022-07-10T20:33:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![InvisiblePanda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@InvisiblePanda](https://forums.unrealengine.com/u/InvisiblePanda)\
**Post date:** [July 10, 2022, 8:33pm UTC](https://forums.unrealengine.com/t/smooth-character-rotation-via-mouse-cursor/601840/1 "2022-07-10T20:33:47Z")

</div>

Hi everyone! I’m trying to create a character bp which always looks in the cursor direction. And I also want this character to rotate smoothly.

Here is my code for this bp:

 ![10July2022_078](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/a/0faed6c98ace0d46bfd9643ac7cf4b1041d59028.png)

The only problem is that when the cursor passes the certain point at the bottom of the screen the rotation instantly changes from -180 to 180, which causes my character to rotate in a different direction.

Here is a gif example:  
 ![10July2022_8112V](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/a/21a9211e798e3fb8e1ccac132ef0bac47429c7de.gif)

What should I do to prevent that?

---

<div class="post-metadata">

**Author:** ![Bojann](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bojann/32/906560_2.png) [@Bojann](https://forums.unrealengine.com/u/Bojann)\
**Post date:** [July 10, 2022, 9:07pm UTC](https://forums.unrealengine.com/t/smooth-character-rotation-via-mouse-cursor/601840/2 "2022-07-10T21:07:12Z")

</div>

Have you tried RInterpTo, instead of Float?

---

<div class="post-metadata">

**Author:** ![InvisiblePanda](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@InvisiblePanda](https://forums.unrealengine.com/u/InvisiblePanda)\
**Post date:** [July 10, 2022, 9:21pm UTC](https://forums.unrealengine.com/t/smooth-character-rotation-via-mouse-cursor/601840/3 "2022-07-10T21:21:06Z")

</div>

Hey, thanks! I didn’t even know that such thing even exists. That’s exactly what I was looking for!
