BodyFixedDirection

type BodyFixedDirection

A unit direction from a body's center, expressed in that body's rotating axes.

Branded because a bare Vec3 carries no axes and this is the one place where passing the wrong ones is both easy and silent: terrain is a function of position on the turning body, so an inertial direction leaves the mountains standing still in inertial space while the planet rotates underneath them. That shipped once as "a ship landing 83 m above the ground it had just touched", and it shipped a second time in the drag path, where nothing rendered wrong and nothing failed — the density was simply computed against the wrong mountain.

AGENTS.md enumerates three producers — bodyFixedDirection, geodeticDirection and regionDirection — and that list is the enforcement mechanism, not a summary of it: none of the three can be reached without a spin frame, a latitude/longitude or a region address, which is what makes the brand worth its cost. faceToDirection below is the primitive regionDirection is built from and is branded for that reason; production code goes through regionDirection, so the list stays three long.

universe/src/terrain.ts:87

Type

Brand<Vec3, 'body-fixed'>