Smooth transition when enabling use controller rotation yaw

Hello! I want to do that by enabling the “Use Controller Rotation Yaw”, instead of snapping the rotation of the character to where the camera is, do it smoothly. I have this, but it does not work… Any idea?

*This is for aim/crosshair. When i press the button the zoom and crosshair appear, and if i hold the button with the “Use Controller Rotation Yaw” it does good. But the problem is the first time that i click the button. The Rotation Yaw snap the camera instead move it smoothly…

Greetings!

you must first set your actor rotation smoothly then check if it is equal to controller rotation if it is equal to control rotation then enable use control rotation yaw

Thx for the reply. The problem was that I did not have it connected to the event tick. I had it to an input event and didnt work.

And with your check works perfect. Thanks!

Hey there. I’m really struggling with this type of issue myself. Can i ask you how you had this connected to the tick event? Because I have seen people connect the delta time input from the interpolate node to the tick event. But i see you used the get world delta seconds node. I see that this is a macro as well. May I please see how you connected this to your tick event?
Im trying to get my actor to align with the control rotation when I melee attack. So like in ESO, your char can be facing one direction, but then if you turn camera to the left and press light attack, your char will turn to the left and align themselves with the control rotation. I have that working in my project but it is instant and looks very glitchy. I tried using interpolate node but I can’t get it working right :confused: Please let me know if anyone has any ideas. Also I’m not sure where this would tie into the tick event in my case. I hope I can get this working. Thanks.

I tried this solution, and it doesn’t work because of the difference in rotation values when you over-rotate. I reworked the idea and produces the outcome I was hoping for, without attaching to the Event Tick. I adjusted the Error Tolerance on the Nearly Equal to 0.0001 to smooth it even more.

you would need to use Linear Interpolation aka “Lerp” to transition between Current Rotation and Control Rotation

then, after your camera is done rotating, you set UseControlRotation

here is a tutorial on using lerp. He uses it to move a location, but the same principal would apply to rotation:

it should look something like this:

1 Like