var inputDir = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
var direction = transform.basis * Vector3(inputDir.x, 0, inputDir.y).normalized()
var sum = direction * speed
if inputDir.length_squared() > 0:
rotation.y = inputDir.angle()
rotate my character in the wrong direction?
left is up
up is left
right is down
down is right
I checked my input map and they are right? I have no clue
I actually figured it out. For some reason the code for the rotation var is: var rotation_dir = Input.get_vector("ui_up", "ui_down", "ui_left", "ui_right")
and then later rotation.y = rotation_dir.angle()