Search completed in 1.33 seconds.
1 results for "requestoffsetreferencespace":
Using bounded reference spaces - Web APIs
Web › API › WebXR Device API › Bounded reference spaces
er in the right place. Keep in mind that by default, the viewer's position is placed immediately above the floor, like a camera lying on the ground. If you wish to simulate a human's perspective on the scene, you probably want to move the viewpoint upward by a distance that approximates human eye level by transforming it by providing an appropriate transform matrix to the XRReferenceSpace method requestOffsetReferenceSpace(). This would change the onRefSpaceCreated() method from the above snippet to: function onRefSpaceCreated(refSpace) { xrSession.updateRenderState({ baseLayer: new XRWebGLLayer(xrSession, gl) }); let startPosition = vec3.fromValues(0, 1.5, 0); const startOrientation = vec3.fromValues(0, 0, 1.0); xrReferenceSpace = xrReferenceSpace.getOffsetReferenceSpace( new XRRigidTran...