Skip to content

@relu-interactives/spatial-ecs


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

Type Alias: XRRigOptions ​

ts
type XRRigOptions = {
  trackingOrigin?: XrTrackingOrigin;
  locomotion?: XrLocomotionMode;
  moveSpeed?: number;
  snapTurn?: boolean;
  snapTurnDegrees?: number;
  fallbackEyeHeight?: number;
  teleportArcColor?: string;
  teleportArcInvalidColor?: string;
  teleportArcThickness?: number;
  passthrough?: boolean;
  depthOcclusion?: boolean;
  environmentPhysics?: XrEnvironmentPhysics;
  environmentDebug?: boolean;
  hitTest?: boolean;
  anchors?: boolean;
};

Defined in: components/XRRig.ts:36

Optional initializer for XRRigComponent.

Properties ​

PropertyTypeDescriptionDefined in
trackingOrigin?XrTrackingOriginWhere the headset origin sits. Defaults to floor.components/XRRig.ts:38
locomotion?XrLocomotionModeMovement style. Defaults to teleport — the most comfort-safe option.components/XRRig.ts:40
moveSpeed?numberMetres/second for smooth locomotion.components/XRRig.ts:42
snapTurn?booleanRotate in fixed steps instead of continuously (greatly reduces nausea).components/XRRig.ts:44
snapTurnDegrees?numberDegrees per snap-turn step.components/XRRig.ts:46
fallbackEyeHeight?numberHeight in metres used when the device reports no floor-relative space.components/XRRig.ts:48
teleportArcColor?stringTeleport arc colour when it lands somewhere valid.components/XRRig.ts:50
teleportArcInvalidColor?stringTeleport arc colour when it lands nowhere teleportable.components/XRRig.ts:52
teleportArcThickness?numberTeleport arc thickness (diameter), metres.components/XRRig.ts:54
passthrough?booleanRun the session in passthrough (immersive-ar) instead of VR.components/XRRig.ts:58
depthOcclusion?booleanLet real objects occlude virtual ones, via WebXR depth sensing.components/XRRig.ts:60
environmentPhysics?XrEnvironmentPhysicsWhich detected real-world geometry becomes physics colliders.components/XRRig.ts:62
environmentDebug?booleanDraw the detected room geometry on-device, for checking a scan.components/XRRig.ts:64
hitTest?booleanAllow scripts to raycast against the real room (hit-test).components/XRRig.ts:66
anchors?booleanAllow content to be pinned to real-world features (anchors).components/XRRig.ts:68