How to use lerp_angle()

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CreekWorks

I have looked at similar posts on this forum but can’t get Lerp_angle() to work.
I am using it to go from my current rotation (rotation_degrees.y) to the rotation of my camera (Global.camerarot, holds y rotation of my camera). Using a normal lerp() function it works fine and rotates my character, but with lerp_angle() it does nothing or gritters the rotation. What am I doing wrong? This is done in 3D if that matters. Thank you!

rotation_degrees.y = lerp_angle(rotation_degrees.y, Global.camerarot, 2.5 * delta)
1 Like
:bust_in_silhouette: Reply From: magicalogic

You are using rotation_degrees.y but the function works with radians. This may be the problem so try changing it to just rotation.yand use deg2radmethod to convert degrees to radians.

Thank you! I must have missed that in the docs.

CreekWorks | 2021-06-03 14:17