When the game lags, my character slips through walls and falls out of the world
Thin walls and floors hold when all is smooth and fail at the worst moment. This entry calculates how fast and how slow a frame may be before something can jump over a wall, and checks a movement record for the steps that were too big.
Why this works
The game moves things in steps and only checks where they land. If one step is longer than the wall plus the body, the object is never inside the wall at any checked moment, so nothing stops it.
When not to use it
If your engine moves objects with a sweep test that follows the whole path, this is already handled; check the setting before adding your own limit.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 2 common mistakes and the fix
- 27 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 "When the game lags, my character slips through walls and falls out of the world" (read_entry survival-fast-player-walks-through-walls) 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