Why does physics middleware expect a world built in metres and kilograms, and what goes wrong when a game uses another scale?
answer
- tolerances are absolute numbers
- gravity is in units per second squared
- centimetres: a hundred times off
- tiny props versus margins and slop
- mass ratios between touching bodies
basics
~20 sMiddleware tunes gravity, contact tolerances and sleep thresholds as absolute numbers in metres, kilograms and seconds. At another scale those numbers are off by the scale factor: objects fall too slowly, or jitter and never rest.
solid answer
~50 sEvery length-based setting in a physics middleware is a plain number in world units, tuned on the assumption that one unit is a metre: gravity of about `9.81` units/s², a penetration slop and a contact distance of millimetres to centimetres, a sleep speed threshold, sometimes a cap on how far a body may move in one step. In a centimetre-built level a 30 cm vase is 30 units long. Leave gravity at 9.81 and everything falls in slow motion; scale gravity to 981 but not the tolerances and they become a hundred times tighter relative to the props, so contacts flicker, small props jitter and never fall asleep. Fix it with one conversion at import or at the physics boundary, or by scaling every length and speed setting together. Mass units matter less than mass ratios: keep bodies that touch or are jointed within roughly an order of magnitude of each other where possible.
go deeper
Recall that middleware assumes metres, kilograms and seconds, and that gravity and tolerances are plain numbers in those units.
Explain how a centimetre world breaks gravity first and tolerances second, and why tiny props sink or hover at metre scale.
Diagnose jitter or floaty motion by checking units before touching iterations, and list every setting that scales with length or speed.
Decide where the unit conversion lives for the whole team, usually the asset pipeline, so no gameplay constant is tuned in the wrong scale.
## Why a unit choice reaches the simulation at all A physics middleware never sees "metres" or "centimetres". It sees numbers. A body at position `(150, 0, 30)` is 150 units along one axis, and the library has no idea whether that is 150 metres or 150 centimetres. Yet almost every setting it ships with was chosen by someone who assumed **one unit = one metre**, one mass unit = one kilogram and time in seconds. Those settings are **absolute numbers in world units**, so they only mean what their authors intended at the scale they assumed. The settings that carry an implicit length or speed include: - **Gravity**, in units per second squared. Earth gravity is about 9.81 m/s², which is 981 cm/s². - **Penetration slop**: how far two bodies may overlap before position correction pushes them apart. - **Contact distance** (also called contact offset or speculative margin): how close two shapes must be before a contact is created. - **Sleep thresholds**: the linear and angular speeds below which a body counts as resting. - **Speed or per-step travel caps** that some middleware applies to keep the solver stable. - **Collision margins** around convex shapes, and character-controller step heights and skin widths in the game's own code. ## The centimetre scene: two ways to get it wrong Suppose the art team builds a kitchen in centimetres: a 30 cm vase is 30 units tall, a 2 m cupboard is 200 units. 1. **Gravity left at 9.81.** The library now applies 9.81 cm/s², a hundred times weaker than Earth. Free fall from 1 m (100 units) takes `sqrt(2 * 100 / 9.81)`, about 4.5 s, instead of about 0.45 s. Everything feels floaty, like a scene on a small moon. 2. **Gravity fixed to 981, tolerances left alone.** Falling now looks right, but a slop tuned as "a few millimetres" is now a few hundredths of a millimetre relative to the props. Position correction fights every tiny overlap, contacts appear and disappear between steps, and small props **jitter on the shelf and never fall asleep**, because a sleep speed threshold tuned as "a few centimetres per second" now means "a few hundredths of a centimetre per second" and solver noise alone exceeds it. A speed cap expressed per step can also clip fast objects, because every speed is now a hundred times larger in numbers. The mirror image happens when the scene is in metres but contains tiny objects: a 1 cm bullet casing is smaller than a typical slop plus margin, so it visibly sinks into the floor or hovers above it. ## Mass units and mass ratios Mass units are less sensitive than lengths, because most thresholds are speeds, but **mass ratios** matter a lot. An iterative solver handles a light body under a heavy one badly: a 500 kg wardrobe resting on a 2 kg crate is a 250:1 ratio, and the crate is squashed into the floor or the stack jitters. A common rule of thumb is to keep bodies that touch or are jointed within about ten to one where gameplay allows. Game physics does not have to use real masses; making the crate heavier is often the cheapest fix. ## What a team should do | Option | Effort | Risk | |---|---|---| | Author or import everything in metres and kilograms | one conversion in the asset pipeline | lowest; defaults just work | | Keep game units, convert at the physics boundary | a scale factor on every position, velocity and force crossing the boundary | a missed conversion in one call site | | Keep game units and rescale every setting | change gravity, slop, contact distance, sleep speeds, caps | easy to miss one setting | Some middleware lets you declare the typical object length and speed once at start-up so it derives its default tolerances from them; that helps, but gameplay constants (jump impulses, character step heights) still need the same care. A practical rule of thumb is to keep moving bodies roughly between a tenth of a metre and a few tens of metres, to treat smaller details as visual only, and to check every new setting with the question "what unit is this number in?". Precision of positions far from the origin is a separate floating-point concern, not a reason to choose centimetres.
- If the art pipeline is in centimetres and cannot change, what is the cleanest fix?Convert at the physics boundary: divide positions and sizes by 100 when creating bodies, multiply results by 100 when copying transforms back, and convert velocities, impulses and forces the same way. The middleware then runs in metres with its defaults intact, and the scale factor lives in one place instead of in every tuned setting.
- Why does a heavy body resting on a light one cause trouble even at the right unit scale?An iterative solver spreads corrections one constraint at a time, so a light body squeezed between a heavy one and the ground needs many passes to hold the heavy one up. With a large mass ratio and a few passes, the light body is pushed into the floor or the stack jitters. Reducing the ratio is usually cheaper than adding iterations.
It is like a recipe written in grams followed with a scale set to ounces: every quantity is a correct number in the wrong unit, so the result is consistently and confusingly off.
- Units do not matter because physics is just consistent math
- Scaling gravity alone fixes a centimetre world
- Use real-world masses even with a 1000:1 ratio between touching bodies
- Choose centimetres for more precision in physics
- Tiny props behave fine with tolerances tuned for metre-sized objects