Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples not working on mobile device #210

Open
4 tasks
sophiadeak opened this issue Mar 20, 2024 · 3 comments
Open
4 tasks

examples not working on mobile device #210

sophiadeak opened this issue Mar 20, 2024 · 3 comments

Comments

@sophiadeak
Copy link

sophiadeak commented Mar 20, 2024

Nature of issue?

  • [ x] Found a bug
  • Existing feature enhancement
  • New feature request

Which area does this problem relate to?

  • [x ] VR
  • AR(ARCORE)
  • AR(MARKER)

Details about the bug:

  • p5.js version: 1.4.1
  • Device Name: pixel 5
  • Web browser and version: Chrome version 122.0.6261.119
  • Operating System: Android 14
  • Steps to reproduce this:

I've tried these examples from the p5.xr website.
As well as the examples included in this repo

The examples load, but i'm only able to move the camera angle by touching the screen and 'moving' the scene around.
When I move my phone around, the view does not change.

I was expecting behaviour similar to google-cardboard style VR, but if that's not how these examples should work, then please delete the issue

@TiborUdvari
Copy link
Collaborator

Did you build the project yourself or are you using the provided examples? I think my pull request should have fixed this but it has not been packaged up into a new release yet: #205

@TiborUdvari
Copy link
Collaborator

On the other hand, this should technically work in inline mode

Inline: Requested with the mode enum 'inline'. Inline sessions do not have the ability to display content on the XR device, but may be allowed to access device tracking information and use it to render content on the page. (This technique, where a scene rendered to the page is responsive to device movement, is sometimes referred to as “Magic Window” mode.)
https://immersive-web.github.io/webxr/explainer.html#inline-sessions

This might be related to new permissions requirements, on iOS at least permissions for accelerometer data need to be requested as well. Here is an example: https://editor.p5js.org/[email protected]/sketches/eUJ-6wT0t

For example the accelerometer demos don't work for me anymore from the from the official p5 website: https://p5js.org/reference/#/p5/accelerationX

@stalgiag
Copy link
Owner

stalgiag commented Mar 26, 2024

This should work with an Android phone. It is possible it isn't detecting the support for VR on the device. Curious does this example work on your device?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants