Fix climbing from a ceiling lip onto the wall above #1

Merged
SnekInAScarf merged 1 commit from fix-lip-wall-climb into main 2026-10-31 14:38:26 -05:00
Owner

Problem

Pressing up while hanging on a ceiling lip did nothing. The lip state set both velocities to 0, so the slime never touched the wall above. It only reached the wall when the last step off the ceiling happened to catch the corner as a wall contact, which depends on exact positioning.

Changes (Characters/player.gd)

  • Climb onto the wall from the lip: while hanging, holding up moves the slime up at CLIMB_SPEED and slightly back towards the platform (WALL_STICK_SPEED, opposite to the direction it walked off). The round collision shape slides around the corner and touches the wall, and the existing wall-sticking code takes over.
  • Lip only starts when walking off a ceiling edge: the old check (wasJustOnCeiling != isStickingToCeiling) also fired when landing on a ceiling (freezing horizontal movement for 0.5s) and when dropping off with down. It now requires leaving the ceiling while moving sideways, and records lipDirection.
  • Don't fall straight off the wall afterwards: right after climbing on, the player is usually still holding away from the wall, which used to start the unstick timer. That's ignored until the direction is released once.
  • Removed a leftover print(velocity.x).

Testing

Not run in Godot yet. Please check:

  • Walk along a ceiling off its edge: the slime hangs for ~0.5s, then falls if you keep holding the direction.
  • While hanging, press up: the slime wraps onto the wall above and can keep climbing.
  • Still holding the original direction after reaching the wall: the slime stays on the wall.
  • Landing on a ceiling no longer freezes sideways movement.
  • Holding down on a ceiling drops off normally, with no hang.

One possible issue: if the corner contact registers as wall and ceiling in the same frame while up is held, the existing corner rule prefers the ceiling, which could bounce the slime back into the ceiling state.

🤖 Generated with Claude Code

## Problem Pressing up while hanging on a ceiling lip did nothing. The lip state set both velocities to 0, so the slime never touched the wall above. It only reached the wall when the last step off the ceiling happened to catch the corner as a wall contact, which depends on exact positioning. ## Changes (`Characters/player.gd`) - **Climb onto the wall from the lip:** while hanging, holding up moves the slime up at `CLIMB_SPEED` and slightly back towards the platform (`WALL_STICK_SPEED`, opposite to the direction it walked off). The round collision shape slides around the corner and touches the wall, and the existing wall-sticking code takes over. - **Lip only starts when walking off a ceiling edge:** the old check (`wasJustOnCeiling != isStickingToCeiling`) also fired when *landing* on a ceiling (freezing horizontal movement for 0.5s) and when dropping off with down. It now requires leaving the ceiling while moving sideways, and records `lipDirection`. - **Don't fall straight off the wall afterwards:** right after climbing on, the player is usually still holding away from the wall, which used to start the unstick timer. That's ignored until the direction is released once. - Removed a leftover `print(velocity.x)`. ## Testing Not run in Godot yet. Please check: - [ ] Walk along a ceiling off its edge: the slime hangs for ~0.5s, then falls if you keep holding the direction. - [ ] While hanging, press up: the slime wraps onto the wall above and can keep climbing. - [ ] Still holding the original direction after reaching the wall: the slime stays on the wall. - [ ] Landing on a ceiling no longer freezes sideways movement. - [ ] Holding down on a ceiling drops off normally, with no hang. One possible issue: if the corner contact registers as wall *and* ceiling in the same frame while up is held, the existing corner rule prefers the ceiling, which could bounce the slime back into the ceiling state. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SnekInAScarf added 1 commit 2026-10-31 14:30:23 -05:00
- Pressing up while hanging on a lip now moves the slime up and back
  towards the platform so it wraps onto the wall instead of staying frozen.
- Only walking off a ceiling edge starts a lip hang (not landing on a
  ceiling or dropping off it with down).
- Don't count the held direction towards unsticking from the wall right
  after climbing on from a lip, until it's released.
- Remove leftover debug print.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SnekInAScarf merged commit c72708e63e into main 2026-10-31 14:38:26 -05:00
SnekInAScarf deleted branch fix-lip-wall-climb 2026-10-31 14:38:26 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: SnekInAScarf/SlimePlatformer#1
No description provided.