forked from team-sg/hero-mark-2
SG, grip tighter! (fixes #92)
This commit is contained in:
parent
09a15604f1
commit
cea2d29e46
1 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,9 @@ func _on_AirShooting_state_entered() -> void:
|
|||
func _on_Climbing_state_entered() -> void:
|
||||
if ladder_detector.get_collider().is_in_group("ladder"):
|
||||
_attached_ladder = ladder_detector.get_collider()
|
||||
# move a tiny bit up if on ground to detach from falling blocks
|
||||
if is_on_floor():
|
||||
global_position.y -= get("collision/safe_margin")
|
||||
velocity = Vector2.ZERO
|
||||
snap = Vector2.ZERO
|
||||
if global_position.x < _attached_ladder.middle:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue