Rotate problem beyond 180/-180 degrees, spins the long way round

Hi

Have searched the web for this problem for blueprints a while now, but cant find a solution. As the video shows, when I execute an action, the actor turns towards the player (great for dialog interaction). But when rotating beyond 180/-180 degrees it takes the long way round. How do you solve this? Is there an build in system already? Heard that the lerp could cause the problem

Video: UE5 - Rotate problem beyond 180/-180 degrees, spins the long way round - YouTube

Blueprint:

1 Like

You might be able to get it working by popping this open and choosing ‘shortest path’

image

Otherwise, you’ll need to do it with rinterp, which uses a better method.

2 Likes

Thanks for the reply and getting me on the right track - its working now!

As the image under shows, there is no “shortest path” in the “set actor relative rotation” node. BUT, the “lerp (rotation)” node has that option. I just replaced the original lerp with the rotation variant, and it works great! Thanks!

2 Likes

I knew it was nearby :wink:

1 Like