the classic
This commit is contained in:
parent
e39dc97bd3
commit
dccc27dd72
2 changed files with 14 additions and 1 deletions
|
|
@ -14,6 +14,6 @@ var focused: bool:
|
|||
func _physics_process(delta: float) -> void:
|
||||
var input_dir = Input.get_vector(&"move_left", &"move_right", &"move_up", &"move_down").sign()
|
||||
|
||||
velocity = input_dir * (move_focused_speed if focused else move_normal_speed)
|
||||
velocity = input_dir.normalized() * (move_focused_speed if focused else move_normal_speed)
|
||||
|
||||
move_and_slide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue