Improved performance

This commit is contained in:
2024-02-26 23:50:56 +01:00
parent afab83a35f
commit 885459f5d3
12 changed files with 45 additions and 13 deletions

View File

@ -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))