Updated the way of fetching the height

This commit is contained in:
pbentes 2024-09-01 23:18:05 +01:00
parent 6ba0b62dd9
commit 44cb5c28b2

View File

@ -20,5 +20,5 @@ func physics_update(delta: float) -> void:
player.locomotion.move_and_slide()
player.locomotion.update_collider_height(delta)
if not (Input.is_action_pressed("duck") or player.locomotion.has_collision_above($".".settings.HEIGHT)):
if not (Input.is_action_pressed("duck") or player.locomotion.has_collision_above(player.state_machine.get_state("Running").settings.HEIGHT)):
transition.emit("Running")