Characters stand on slopes they should slide off, or cannot jump on gentle ones
Slopes confuse ground detection: a steep hill counts as floor, a ceiling counts as floor, and a gentle ramp blocks jumping. The answer lies in which way the surface faces, not in angles you have to measure. Here are the cut-offs and the slide direction.
Why this works
A surface is a floor, a slide or a wall depending on which way it faces, not on how a designer pictured it. Asking which way it faces gives a clean answer that never breaks on a straight-up wall, and a small margin stops it flickering.
When not to use it
Skip it in a game with flat floors only, or where slopes are decoration the hero walks over. And skip the sliding in games where steep ground should be a plain wall, such as a cave maze; there, a hard block is clearer than a slide.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 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 "Characters stand on slopes they should slide off, or cannot jump on gentle ones" (read_entry steep-slope-slide-and-jump-rules) 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