If I recall correctly, you can also use cos
and sin
to calculate the angle:
var direction = Vector2(
Input.get_joy_axis(0, JOY_AXIS_2),
Input.get_joy_axis(0, JOY_AXIS_3)
)
var angle = cos(direction.x) + sin(direction.y)
node_to_rotate.rotation = angle