func _physics_process(delta):
var moveDir = 0
var turnDir = 0
velocity = Vector3.ZERO
if Input.is_action_pressed(“Forwards”):
moveDir += 1
if Input.is_action_pressed(“Backwards”):
moveDir -= 1
if Input.is_action_pressed(“Leftwards”):
turnDir += 1
if Input.is_action_pressed(“Rightwards”):
turnDir -= 1
rotation_degrees.y += turnDir * turnSpeed * delta
velocity.x = moveSpeed * moveDir
velocity.z = moveSpeed * moveDir
velocity.y = yVelo
move_and_slide()
the character is only moveing on 1 axis which is diagonal and doesn’t change when i turn the character
Oh I see. Then I think you should try changing the rotating speed as it will rotate the object by 180 degrees in case of ~60 fps according to calculations. Try setting it to like 15 or 30