How to properly apply a Tween to a 3D rotation in Godot 4?

141 Views Asked by At

I have a Node3D which I would like to smoothly transition to a certain target rotation (given in euler angles, in degrees).

When I manually apply lerp(...) on all 3 dimensions of the euler angle vector (modulo 360) then it works fine. However, when I attempt to use a Tween (which seems to be the preferred way for such a use case in Godot 4) then I get crazy intermediate rotations - the final position is again fine.

Am I doing things wrong here? Can anyone give me an example of how to properly rotate a Node3D towards a given target rotation using a Tween?

0

There are 0 best solutions below