Skip to content

WebXR Haptics Example Breaks When Entering VR Directly from Oculus Browser UI #30857

Closed
@arturitu

Description

@arturitu

Description

The Oculus Browser now has a native "Enter VR" button if pressed. Since "initAudio" doesn't start, in the example at https://threejs.org/examples/?q=webxr#webxr_xr_haptics, it crashes when trying to run one of the oscillators.
I haven't found a way to record the event as a user action, which is usually required to play sounds. (I think this is more of a browser issue, but there may be some workaround.)

webxr_xr_haptics.html:250 Uncaught TypeError: Cannot read properties of undefined (reading 'frequency') at handleCollisions (webxr_xr_haptics.html:250:25) at animate (webxr_xr_haptics.html:299:5) at onAnimationFrame (three.module.js:13638:36) at XRSession.onAnimationFrame (three.module.js:18:3)

Reproduction steps

  1. Visit https://threejs.org/examples/?q=webxr#webxr_xr_haptics with Oculus Browser
  2. Click on "Enter VR" native button (top right next to the URL bar)
  3. Touch any of the 3D boxes

Screenshots

Image

Version

r175

Device

Headset

Browser

Oculus Browser 37.2.0.6.62.707518668

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions