"s&box units are inches"
- Props pile near the world origin, or sit ~39× too close / too far.
- NPCs march steadily in a wrong direction and never converge on a waypoint ("running into walls").
- Gravity feels wrong for physical suspension (default scene gravity is ~2.2g in units).
- A meters-authored array "looks right" in one code path and catastrophically wrong in another.
s&box world units are inches. 1 m = 39.37 u.
Meters/units mixups travel in packs. Typical failure modes:
- Building a world target from raw meter values (target ~39× too close to origin).
- Helpers with both
xxxMetersandxxxUnitsparams in one file — every crossing call is a hazard. - Converting twice (
center / Mwhencenterwas already meters), or converting on some axes and not others.
Default scene gravity is ~2.2g in units — fine for chunky arcade feel, wrong for physical suspension.
One constant, one boundary:
const float MetersToUnits = 39.37f;
// alias used in many codebases:
const float M = MetersToUnits;Author design math in SI end-to-end. Convert at exactly one * M per placement / spawn / waypoint write.
vmdl import (meters-authored OBJ):
import_scale = 39.37Gravity (when you need real physics):
Scene.PhysicsWorld.Gravity = Vector3.Down * 9.81f * MetersToUnits;Boot audit pattern — after spawning, re-read transforms and assert the intended plane/span. A z-only proof line can validate one placement while an xy collapse survives unnoticed; assert the full transform.
When an NPC walks forever the wrong way: treat it as a missed meters→units conversion. Grep every consumer of the authored meter array and confirm each applies * M.
The engine never "knows" you meant meters. Source 2–style worlds are inch-based; Blender and human design notes are meter-based. Keeping SI inside your generators/builders and multiplying by 39.37 once at the boundary means every subsystem (render mesh scale, colliders, waypoints, gravity) shares one frame. Partial conversion looks like a logic bug (pathfinding, AI, placement) because the numbers are still "reasonable" — just systematically wrong by ~39×.