Improved camera
This commit is contained in:
@ -17,7 +17,7 @@ func _unhandled_input(event):
|
||||
|
||||
# Calculate the direction
|
||||
var move := Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
var direction := (Global.camera.transform.basis * Vector3(move.x, 0, move.y))
|
||||
var direction := (Global.camera.global_basis * Vector3(move.x, 0, move.y))
|
||||
direction.y = 0
|
||||
direction = direction.normalized()
|
||||
|
||||
|
Reference in New Issue
Block a user