Two RayCast2D edge sensors point down into the floor edgeSensorRange to
each side of the slime. When one stops touching floor there's an edge in
range on that side, and pressing down slides to it, swings over the
corner and carries on down the wall so the slime ends flat against it.
- Down + a direction picks that side; down alone goes the way the slime
is facing, or the other way if only that side has an edge in range.
- Down in the middle of a platform does nothing.
- edgeSensorRange is exported (default 24, tuned with a headless sweep).
- Wraps can now start with a straight move to the arc, and end with a
move_and_slide so is_on_floor()/is_on_wall() aren't stale afterwards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wrap ended with the slime level with the corner and WRAP_MARGIN away
from the wall. The wall stick push only covers ~0.33px a frame, so it
often didn't touch the wall on the next move_and_slide, stopped sticking
and fell.
- After the arc, carry on straight up the wall by the radius (or onto the
platform for wall tops) so the slime ends flat against the surface.
- Close the remaining gap with move_and_collide when the wrap finishes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Instead of relying on physics to slide the round collider around a
corner, find the corner with raycasts and swing the slime around it on
a quarter circle at crawling speed, rotating the sprite along with it.
- Hanging on a ceiling lip + up: swing onto the wall above.
- Climbing up past the top of a wall: swing over onto the floor on top.
- Tapping up up to 0.15s before reaching a lip still counts.
- Falls back to the old behaviour if the corner can't be found or there
is no room at the end of the swing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>