Pull the hero up a ledge along a path that never cuts through the corner
When the hero grabs a ledge and the climb animation plays, moving straight from hand to top cuts diagonally through the corner, and a long frame can end up inside the wall. Here is a two-part path with an exact finish that you can time to the animation.
Why this works
When the game moves the character by itself, the path must follow what the body would really do: first up the wall, then over the edge. Splitting the move into two parts, each with soft starts and ends, looks right and always ends on the exact spot.
When not to use it
Avoid it when the player should stay in control, such as in a fast platformer where the pause feels like lost time, or when ledges differ a lot in shape. Let physics lift the hero with a short jump instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 24 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Pull the hero up a ledge along a path that never cuts through the corner" (read_entry ledge-climb-moves-up-then-over-in-set-time) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP