Fix #155 Add Wall -> ledge state transition to avoid jitter

This commit is contained in:
Nathan Lovato 2019-08-23 11:35:26 +02:00
parent af3e4bb83b
commit c1a3af6082

View file

@ -34,6 +34,9 @@ func physics_process(delta: float) -> void:
if is_moving_away_from_wall or not owner.ledge_wall_detector.is_against_wall():
_state_machine.transition_to("Move/Air", {"velocity":_velocity})
if owner.ledge_wall_detector.is_against_ledge():
_state_machine.transition_to("Ledge", {move_state = move})
func enter(msg: Dictionary = {}) -> void:
_parent.enter(msg)