diff --git a/objects/player/player.gd b/objects/player/player.gd index 4efbe3e..a13f585 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -64,6 +64,11 @@ func _physics_process(delta): #Gravity if current_state != State.CLIMB: velocity.y += gravity + #Cut y velocity when hitting ceiling + if is_on_ceiling(): + current_state = State.FALL + position.y += 1 + velocity.y = 0 #Apply velocity move_and_slide(velocity,Vector2.UP) #Debug