- # Get the XZ input direction based on player's input relative to the camera
- var forward := camera.global_basis.z
- var right := camera.global_basis.x
- var movement_direction := (
- forward * input.movement_direction.y + right * input.movement_direction.x
- ).normalized()
- movement_direction.y = 0
+ var movement_direction := Vector3(
+ input.player_movement_direction.x,
+ 0,
+ input.player_movement_direction.y
+ )