RInterp To for Character Rotation Towards Cursor Breaks

Hey guys!
New to this… :slight_smile:

I created the following blueprint inside my Controller BP.
Having the character rotate towards the mouse cursor worked perfectly when I had the “Find Look at Rotation” node connected directly to the “Set Actor Rotation” but as soon as I introduced the “RInterp To” node, the character either rotates at the original instant speed towards the cursor if the Interp Speed is high OR it won’t really slow down and the rotation will be partial / cuts off if the Interp Speed is lower.
I can’t really get the speed of the rotation to slow down nor be a full rotation when player with the Interp Speed value.

Anyone knows what I did wrong here?

Thank you!

its because of the Pure node (GetActorRotation) which means your RInterp to constantly has a new CurrentZ.

You need to cache the Actor Rotation before using RInterp To

Thanks for the response, Auran!
Might you be able to explain what you mean by caching it? How would I go about doing that?
From my understanding from various tutorials, the CurrentZ indeed constantly changes according to the cursor movement and generally it does look like this.
Here is an example from Unreal University in Youtube:

Full vid with the specific tmeline tag:

Thanks!

caching just means saving a variable state, ie save the actor rotation.

you’ll see in the video his StartLookAtRotation is set to 0,0,0 so it doesnt change during the RInterp.

RInterp basically smoothly moves between 2 points, so if both points change (rotation/cursor) you get weird results.

copying his tutorial you could just set StartLookAtRotation is set to 0,0,0 but this is stilla bit iffy.

I havent tested but the way i might do it is Use AddActorLocationRotation clamped to your max speed of a difference between your ActorRotation and TargetRotation

Thanks Auran, I will check it out!
I also found the more direct cause for my issue and it is the darnest thing… Apparently in my Character BP, under Class Defaults, there is a checked box called “Use Controller Rotation Yaw” and unchecking it fixes the problem!

1 Like

The whole idea about rotating characters IS to use Control Rotation. Your script overrides the natural way characters, cameras and movement components work within the intended framework. Hence the clash - Control Rotation tries to do its thing and you force something else with Set Actor Rotation. You’re, potentially, robbing yourself of the benefits of the existing system.


Assuming you’re after smoother rotation - consider interpolating Control Rotation itself instead:

  • the Player Controller BP:

  • the Character BP taking advantage of the system:

  • the result:

There’s more to it, ofc. But forcing a character’s rotation indiscriminately may, and often will, lead to undesired results.

Good luck!

Oh I see, Everynone!
Thanks for explaining that, I had no idea.
I changed everything to work with Set Control Rotation and things are working great.
Thank you :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.