WebVR games fail on Mac Safari


#1

The WebVR lab and Orange Room both fail on Mac Safari. The Orange Room draws once then if you try to interact it goes grey, lab just starts grey.

Trying to make something that works in browser and on VR where available.

There’s no particular clues in console.

Also - WebVR seems buggy? With my Rift I was only able to get FireFox to work, and I need to quite Oculus and Fox a lot to get it working.

Bruce


#2

The WebVR polyfill for PlayCanvas is out of date and needs updating. If you have a paid account, you can export the build and replace the polyfill I think.

WebVR generally is difficult due to the number of platforms and browsers. Chrome should be supported on Android (through polyfill or enabling through the flags) and desktop but you may need to enable it in the flags on desktop for a VR headset to be recognised.

iOS is a bit of a mess as I don’t think Apple are looking to support WebVR natively and therefore you are reliant on the polyfill to work.


#3

Sorry, what is polyfill? Does it replace the normal rendering system playcanvas uses, for games to support WebVR? There’s no way to use the ‘normal’ system unless VR enables properly?

The situation is that I want to support real VR - primarily Rift headsets, and then normal browsers in non-VR, mobile and standard browsers on each platform.

Is there a way to do that in one game? If the polypill version update will get me there, I can replace it no problem - just awkward to debug like that.

Bruce


#4

WebVR is a standard that browsers should follow when implementing support.

For the browsers that don’t support it natively, there is something that is none as a polyfill which is a software library that implements the logic of the standard while support in progress hence the name.

It allows developers to use future functionality in the present and is a common practise in the web development space.

At the moment, not all browsers support WebVR natively or are disabled behind browser feature flags (as shown here) so the polyfill is needed.

Unfortunately, the WebVR polyfill that PlayCanvas is outdated compared to the Git master that it was forked from.

The biggest bug is that Chrome also changed the units that rotation of the display is returned as from/to radians/degrees.

When PlayCanvas is used to make a WebVR app, the polyfill gets included.

I think after the build is exported and the updated WebVR polyfill is replaced, PlayCanvas does work with WebVR as well it can be.

When it was first launched, WebVR Labs supported these platforms. I had it working on DayDream, GearVR, cardboard and Rift on PC. Not sure if iOS worked then :confused: