Fix bug crouch speed

This commit is contained in:
Victor Turgeon 2022-10-12 22:54:52 -04:00
parent 5cb7ca5ce6
commit 05bd11ae6a

View File

@ -83,10 +83,12 @@ func _physics_process(delta):
if Input.is_action_just_pressed("crouch"): if Input.is_action_just_pressed("crouch"):
head.translate(Vector3.DOWN) head.translate(Vector3.DOWN)
speed = 20 speed = 10
if Input.is_action_just_released("crouch"): if Input.is_action_just_released("crouch"):
head.translate(Vector3.UP) head.translate(Vector3.UP)
speed = 40 speed = 20
if Input.is_action_pressed("move_forward"): if Input.is_action_pressed("move_forward"):
direction -= transform.basis.z direction -= transform.basis.z