RuleTested
Bound animation delta after a pause
Prevent a hidden tab or debugger pause from turning one frame into a physics explosion.
Ready to use
Rule text
Clamp frame delta before feeding it into animation or simulation code. For deterministic physics, accumulate bounded time and advance fixed substeps with a maximum step count.Why it helps
The reasoning behind the entry
A large catch-up delta can tunnel fast bodies through colliders and produce a visible camera or animation jump.
Filed under
Use it in more than one place
- Ecosystem
- Three.jsBabylon.jsPlayCanvas
- Platform
- Web