Skip to content

Interpolate

const Interpolate: Component

Draws the entity between its last two fixed-tick transforms (by game.fixedAlpha), for things that move in fixed or physics systems: without it they step at 60 Hz and judder on 120 Hz screens. Rapier bodies get it automatically. Don’t add it to things moved in update; they are already drawn where they are. The renderer keeps the fields; ready is 0 until the first fixed tick records a transform. After teleporting an entity, set Interpolate.ready[e] = 0 so it jumps instead of sliding there.