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;
  startView?: XrView;
};

Defined in: components/XRRig.ts:43

Optional initializer for XRRigComponent.

Properties ​

PropertyTypeDescriptionDefined in
trackingOrigin?XrTrackingOriginWhere the headset origin sits. Defaults to floor.components/XRRig.ts:45
locomotion?XrLocomotionModeMovement style. Defaults to teleport — the most comfort-safe option.components/XRRig.ts:47
moveSpeed?numberMetres/second for smooth locomotion.components/XRRig.ts:49
snapTurn?booleanRotate in fixed steps instead of continuously (greatly reduces nausea).components/XRRig.ts:51
snapTurnDegrees?numberDegrees per snap-turn step.components/XRRig.ts:53
fallbackEyeHeight?numberHeight in metres used when the device reports no floor-relative space.components/XRRig.ts:55
teleportArcColor?stringTeleport arc colour when it lands somewhere valid.components/XRRig.ts:57
teleportArcInvalidColor?stringTeleport arc colour when it lands nowhere teleportable.components/XRRig.ts:59
teleportArcThickness?numberTeleport arc thickness (diameter), metres.components/XRRig.ts:61
passthrough?booleanRun the session in passthrough (immersive-ar) instead of VR.components/XRRig.ts:65
depthOcclusion?booleanLet real objects occlude virtual ones, via WebXR depth sensing.components/XRRig.ts:67
environmentPhysics?XrEnvironmentPhysicsWhich detected real-world geometry becomes physics colliders.components/XRRig.ts:69
environmentDebug?booleanDraw the detected room geometry on-device, for checking a scan.components/XRRig.ts:71
hitTest?booleanAllow scripts to raycast against the real room (hit-test).components/XRRig.ts:73
anchors?booleanAllow content to be pinned to real-world features (anchors).components/XRRig.ts:75
startView?XrViewWith passthrough: the view a session starts in. Defaults to room.components/XRRig.ts:77