Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / XrTrackingOrigin

Type Alias: XrTrackingOrigin ​

ts
type XrTrackingOrigin = "floor" | "eye";

Defined in: components/XRRig.ts:15

Where the headset's origin sits in the scene.

floor maps to the WebXR local-floor reference space: Y=0 is the user's real floor, so content authored standing on the ground lines up naturally. eye maps to local: Y=0 is wherever the headset was when the session started, which suits seated/cockpit experiences.

Getting this wrong is the classic "I spawned inside/under the geometry" bug — with eye, a scene authored floor-relative places the user's eyes at ground level, sinking them through the floor.