Spielerando

Getting out of a lake onto the shore with a jump from the water

Swimmers get stuck below a bank that is only a little higher than the water, or they shoot out of the lake like a cork when the button is hammered. Here is how to let a kick from the water reach a ledge, and how to stop it from becoming free flight.

Why this works

Getting out of water is a push from something solid, so it depends on where the feet are, not the head. A floating body sits deeper than it looks, and measuring from the feet makes shores reachable exactly when they should be.

When not to use it

Not needed when every shore has a ladder, steps or a marked climbing spot. There, a kick only adds a way to cheat the level. Use a plain ledge climb instead, or let the player simply swim to a ramp.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 34 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Getting out of a lake onto the shore with a jump from the water" (read_entry climb-out-of-water-with-a-kick-jump) 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