Skip to main content

Interface: HitTestRequest

Defined in: webxr-environment/src/world-sensing.ts:171

A standing question: "where does this ray meet the room".

It is standing rather than one-shot because that is what every host offers - a source you create once and read every frame - and because a per-call version would hide how expensive the first one is.

Properties

PropertyModifierTypeDescriptionDefined in
idreadonlystringThe app's own name for it. Answers come back tagged with this.webxr-environment/src/world-sensing.ts:173
offsetRay?readonly{ direction: Vec3; origin: Vec3; }Aim it somewhere other than straight ahead, in the space's own frame.webxr-environment/src/world-sensing.ts:180
offsetRay.directionreadonlyVec3-webxr-environment/src/world-sensing.ts:180
offsetRay.originreadonlyVec3-webxr-environment/src/world-sensing.ts:180
spacereadonly"viewer" | "left" | "right"Whose ray. "viewer" is the head; "left" and "right" are the hands or controllers. A host that cannot serve one of them says so.webxr-environment/src/world-sensing.ts:178