IT lexicon › Programming › Floating origin

Floating origin

Programming På svenska → Updated: 2026-10-26

Moving the entire world so the camera always sits near the coordinate system's zero point, because floats lose precision with distance.

A 32-bit float carries about seven significant digits. Near the origin that means fractions of a millimetre; 50 kilometres out, the gap between neighbouring representable values is around four millimetres. That is where vertices start to wobble, animations shake and z-fighting blooms — Kerbal Space Program players called it "the Kraken".

The fix is to keep the player still and move the world: once the camera crosses a threshold, its position is subtracted from every object and the origin is reset. Physics has to shift along with it, and a networked game's server usually still needs its own higher-precision frame. The alternative is 64-bit coordinates throughout; Unreal Engine 5 switched to that as "Large World Coordinates", although the GPU still receives values relative to the camera.

← Back to the lexicon