Skip to content

WebXR wont work on iOS #18

Open
@ivnnv

Description

@ivnnv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions