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.
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:
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!
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:
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