Smoothly rotate character 180 degrees

I’m trying to have my character rotate 180 degrees (or some arbitrary angle) smoothly and I’m using a timeline and a rotator lerp. It’s lerping from actor rotation to control rotation

The problem is that because the delta continuously gets smaller, the lerp reaches its target at an exponential rate.

I thought I could solve this by setting the actor rotation as a variable before the timeline and lerping from that, but that doesn’t work out well because I need to use shortest path on the lerp (to avoid loops). Since the actor rotation is static, if I alter the control rotation too much, it’s reinterpreting what the shortest path is and basically doing an instant 180.

Any ideas on how to get around this?

Well I made this:

And it uses the shortest path every time.

Instant 180 in your case might result from using Play on the timeline instead of Play From Start, if I got it right.

The only problem in this case is it always takes the same amount of time to turn, no matter if it’s 180 or 5 degrees. If you want a steady turn rate you’ll have to calculate the angle to turn and set the timeline play rate respectively.
Hope this helps.

1 Like

Hmm it’s not quite what I’m going for, I need it to lerp from actor rotation to control rotation (which can be changed)

Here’s what I tried but this flips the rotation when you move the camera in the opposite direction

If I use a regular lerp (or ease) it doesn’t jerk but it takes the long path

1 Like