Improved performance
This commit is contained in:
@ -19,6 +19,9 @@ func _unhandled_input(event: InputEvent):
|
||||
update_direction()
|
||||
update_actions(event)
|
||||
|
||||
if Input.is_key_pressed(KEY_P):
|
||||
get_tree().paused = !get_tree().paused
|
||||
|
||||
func update_direction():
|
||||
var move := Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
|
||||
var direction := (Global.camera.global_basis * Vector3(move.x, 0, move.y))
|
||||
|
Reference in New Issue
Block a user