mirror of
https://github.com/GDQuest/godot-platformer-2d.git
synced 2026-07-17 16:34:54 +00:00
Fix #155 Add Wall -> ledge state transition to avoid jitter
This commit is contained in:
parent
af3e4bb83b
commit
c1a3af6082
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue