Smoothly wrap around ceiling lips and wall tops #2

Merged
SnekInAScarf merged 2 commits from smooth-edge-wrap into main 2026-10-31 20:47:22 -05:00

2 commits

Author SHA1 Message Date
b098b78934 Stay on the wall after wrapping around a lip
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>
2026-10-31 12:46:08 -07:00
43380dd72c Smoothly wrap around ceiling lips and wall tops
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>
2026-10-31 12:41:11 -07:00