webgl-quake3
webgl-quake3 copied to clipboard
WebXR wont work on iOS
Hi @toji, I have tried to do my best to document and report a bug on the webxr polyfill that causes iOS not to be able to use WebXR on this demo (Im trying to make a working q3 cardboard gameplay 😬)
I have seen you had previously contributed to both the examples and the polyfill repos, so maybe this is something you could be able to fix or point me in the right direction to make the view to attach to the device movement:
I made a workaround adding the above on main.js->initEvents()
:
window.addEventListener('deviceorientation', (event) => {
const yPos = isXRPresenting() ? event.gamma : event.beta;
moveLook(-event.alpha * 10, -yPos * 10);
});
which initially "works more or less", but need to figure out how properly transform event's alpha, beta, gamma values to moveLook
parameters.
Thanks in advance. Best.