0 votes

I have looked at similar posts on this forum but can't get Lerpangle() 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)
Godot version 3.3.2
in Engine by (126 points)

1 Answer

0 votes
Best answer

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.

by (1,051 points)
selected by

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.