FA-87274 / Physics integrator stability / Member archive
Falling asleep does not zero velocities · case 04
Sleeping bodies report residual motion and wake-up comparisons drift.
Case contract
solve(v, omega, lin_damp, ang_damp, dt, max_speed, sleep_lin, sleep_ang, sleep_time, kicks): per frame, a sleeping body wakes (timer reset) only when that frame's kick is nonzero, else it is skipped. Add the kick [dvx,dvy,domega], damp with 1/(1+dt*c) (linear and angular coefficients), clamp speed magnitude, then accumulate sleep time while |v|<sleep_lin and |omega|<sleep_ang (else reset). When timer>=sleep_time the body sleeps and velocities are zeroed. Return [vx, vy, omega, timer, asleep, frame index slept or -1].
Why this case matters
Game and robotics physics loops depend on integrator update order, step control and stabilization terms; a wrong decision point turns a stable simulation into drifting or exploding motion.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 1 | [-0.297485, -2.807814, 0.56271, 0.0, false, 2] | [-1.566212, -2.349318, 0.373996, 0.0, false, 2] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗