Skip to content

AR/MR mode doesn't work on PICO headsets / Make Hit Test API optional #4960

@FluorescentHallucinogen

Description

Current behavior:

AR/MR mode doesn't work on PICO headsets (https://picoxr.com).

Tested in the PICO 4 headset on the latest version of PICO Browser and the latest version of firmware version.

Removing 'hit-test' from requiredFeatures or moving it into optionalFeatures in the

await navigator.xr!.requestSession!('immersive-ar', {
  requiredFeatures: ['hit-test'],
  optionalFeatures: ['dom-overlay', 'light-estimation'],
  domOverlay: this.overlay ? {root: this.overlay} : undefined
});

in the /packages/model-viewer/src/three-components/ARRenderer.ts file generally fixes the problem.

The 3D model can be successfully viewed in AR/MR mode.

The only thing is that dragging, scaling and rotating 3D models using motion controllers or hands, recently added by #4643, doesn't work.

I'm pretty sure it's because of unhandled errors (that can be seen in the browser console) related to the Hit Test API not actually being supported, but being called.

Expected behavior:

AR/MR mode does work on PICO headsets.

Hit Test API is optional, not required feature.

The code uses progressive enhancement, i.e. it checks if the browser supports specific Web APIs, and if so, only then it can use them.

Related issues:

See also #4959.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions