WebVR Demo: WebVR Polyfill + Magic Mirror

The current webVR Starter Kit relies on the new WebXR api, which makes sense for modern Android devices. But to get basic WebVR functionality working on iOS I integrated the WebVR Polyfill:
https://playcanvas.com/project/712213/overview/web-vr-current-scene
(currently I also made webxr-capable devices use he polyfill, for ios it still misses the device orientation permission for ios 13)

My current issue is that the buttons (arrow for exit and setup) of the polyfill don’t work.
In the WebVR Lab they seem to work. Do I somehow need to link pc-touch events to the polyfill or is there a different issue?

As a second task I also want to use a “Magic Mirror” Version for the viewer (a non stereo vr-device-orientation solution) additional to the full-stereo-vr-Option. Is there a solution for that as well in the polyfill implementation (similar to here:https://developer.playcanvas.com/ru/user-manual/vr/types-of-vr/) or do I have to implement my own device-orientation-camera?

Thanks in advance for a heads-up.

Ok, I solved it. To make it short - I’m an idiot. Because I was so focused on what could be missing I overlooked that the lookCamera adds a event.preventDefault to the touchstart, which breaks the webVRPolyfill event-handling.

2 Likes

Good catch and thank you for posting the solution! :+1: