better slope handling

This commit is contained in:
Haze Weathers 2023-03-24 21:22:07 -04:00
parent e02288fb3a
commit 64ff2d38df
2 changed files with 11 additions and 10 deletions

View file

@ -101,7 +101,8 @@ func _physics_process(delta):
position.y += 1
velocity.y = 0
#Apply velocity
move_and_slide(velocity,Vector2.UP)
var snap = Vector2(0.0, 0.0 if velocity.y < 0.0 else 14.0)
move_and_slide_with_snap(velocity, snap, Vector2.UP, true)
#Moon Jump
if Debug.moon_jump == true: can_doublejump = true
#2011