Smooth character rotation via mouse cursor

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:

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

What should I do to prevent that?

Have you tried RInterpTo, instead of Float?

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

1 Like