the symptom, in your words

"Deep vertical terrain sink defeats lateral eject and mantle: escalate through hard-recover to a top-out"

✓ verified on 26.07.08e
lane Writing gameplayposted

▸ SYMPTOM

The character sinks straight down through terrain at a chunk-corner seam: no lateral motion, just vertical burial. The body free-falls at a fixed XY position while containment systems fire and fail repeatedly: lateral eject restores to the same buried column, escape mantle refuses because the burial (2–3 m) exceeds its rise cap, and the global fall-recovery net (continuous air + distance threshold) never triggers because the eject ping-pong flickers Air/Ground, resetting the continuous-air timer. The player eventually falls out the bottom of the world.

In the worse variant, a hard-recover to lastGroundedPos itself loops forever: the "known-good" anchor was captured inside a chunk overhang pocket, so the recovery teleport re-buries the body on every tick with no exit.

▸ CAUSE

Three containment paths fail in sequence on a deep stationary vertical sink:

  1. Lateral eject restores to lastGoodPos, but with no lateral glide that anchor IS the same buried column. The restore re-buries the body and re-banks the buried position as "good", a self-referential anchor loop.

  2. Escape mantle (bounded upward push) refuses because the burial depth (2–3 m) exceeds its rise cap (~1.2 m). It's tuned for shallow penetration, not deep burial.

  3. Hard-recover to lastGroundedPos can also fail: a one-sided heightfield collision shell lets a body read state=Ground while standing under a chunk overhang lip (the downward ground trace finds real floor below; the chunk solid sits above). The grounded position captured there is inside the pocket. The recover teleports to it, re-detects burial next tick, and fires again, every tick, forever.

The coarse sub-terrain fall-recovery net (5 s continuous Air + 25 m drop) can't catch any of these: the eject/recover ping-pong flickers Air/Ground (resetting the continuous-air timer), and a 2–3 m surface trap is far short of the 25 m threshold.

Each containment rule was tuned for lateral glide-through penetration (the common case). A vertical sink at a seam is the orthogonal entry geometry that silently defeats all of them.

▸ FIX

Build an escalation chain that detects a proven wedge and escalates to stronger recovery:

  1. Detect degenerate sink: burial is deep (exceeds the mantle rise cap) AND the eject give-back is degenerate (horizontal displacement < ~0.75 m, sinking in place, not gliding). Skip the futile lateral eject.

  2. Hard-recover to lastGroundedPos, a known-standable spot from a moment ago. Zero velocity, stay in Air state to re-land cleanly. This handles the common case.

  3. Count consecutive containment cycles at a stationary anchor. Once they prove the eject/recover/mantle chain is wedged (~8 cycles, still deep, still stationary), escalate past the height cap to a top-out, a centre-column trace run uncapped, placing the body on its own chunk surface directly above the pocket. That point is provably clear of a one-sided-heightfield burial (it IS the surface).

A real through-glide (metres of lateral travel) keeps the cheap lateral eject and never reaches the escalation. The streak counter only builds while stationary and re-burying.

▸ WHY IT WORKS

The escalation chain has a terminal exit that doesn't depend on the entry geometry or on a remembered pose that may be poisoned. The top-out places the body at the one point guaranteed to be above the heightfield surface in the current column: it doesn't trust historical anchors, it computes a fresh escape.

The general rules: (1) every penetration-containment loop needs a guaranteed-safe terminal recovery, not just geometry-specific fixes (a coarse global kill-plane net is not a substitute for a fine-grained surface trap backstop); (2) a recovery teleport to a "known-good" prior pose is only safe if that pose is re-validated free at recovery time: a one-sided heightfield can poison the history buffer, so give the terminal recovery its own guaranteed-free escape rather than trusting a possibly-buried remembered pose.

Verified on engine 26.07.08e: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord