A low-gravity area where the jump still reaches the height you promised
Caves, moons and magic fields change gravity, and two things go wrong: the character jerks at the border when the pull flips at once, and a tuned jump overshoots into the ceiling once the pull is weaker. Here is a smooth handover and a way to still get exactly the height you want.
Why this works
A promise like this jump reaches a certain height must hold even when the pull changes on the way. Simulating the arc through the changing pull, and blending it smoothly, keeps the height as promised and hides the border from the player.
When not to use it
Don't bother if the zone is entered by a portal or sealed door, so no jump ever crosses its edge. Also wrong when the sudden change is a feature, such as a magical barrier. Then a hard switch is clearer.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 35 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 "A low-gravity area where the jump still reaches the height you promised" (read_entry low-gravity-zone-with-smooth-edge) 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