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

AR camera Y-axis flipped? #245

Open
2 of 6 tasks
ffd8 opened this issue Nov 12, 2024 · 2 comments
Open
2 of 6 tasks

AR camera Y-axis flipped? #245

ffd8 opened this issue Nov 12, 2024 · 2 comments

Comments

@ffd8
Copy link

ffd8 commented Nov 12, 2024

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Which area does this problem relate to?

  • VR
  • AR(ARCORE)
  • AR(MARKER)

Details about the bug:

  • p5.js version: 1.11.1
  • Device Name: - Immersive Web Emulator
  • Web browser and version: Chrome 130.0.6723.117
  • Operating System: MacOS 13
  • Steps to reproduce this:

Loading the demo of a cube worked great, same as other forms, until loading text and then 2 things occured

  1. the y-axis seems flipped (solved when adding scale(1, -1)
  2. there is wild z-axis fighting on the letters..

Guessing z-axis issue has to do with it being rendered 2x for the lens? Perhaps only an issue for the emulator, since it's flattening the eyes? And maybe the issue with the flipped y-axis is also an emulator bug, not the library? Will try to test on an actual device asap.

Here's some visual examples of issue:

Flipped Y-axis with type:
Screenshot 2024-11-12 at 23 52 06

Fixed with scale(1, -1):
Screenshot 2024-11-12 at 23 52 13

Issue of Z-axis fighting when rotating the text:
Screenshot 2024-11-13 at 00 31 35

@ffd8
Copy link
Author

ffd8 commented Nov 16, 2024

one more thing to add – it's also perhaps tricky for p5 beginners that the scaling is so different than what they're used to.. everything is mm versus p5 pixels relative values? Perhaps adding a function or option like scaleMode(P5) vs scaleMode(MM), could simplify that? It could both flip the yaxis as mentioned above and allow one to use more expected values, where I'd expect something like fontSize(150), translate(0, 0, -400), etc.

@stalgiag
Copy link
Owner

stalgiag commented Dec 5, 2024

@ffd8 thanks for filing this issue!

I haven't looked at AR mode in a while, but can check it out sometime soon (if no one else gets to it sooner).

I really like the scaleMode() proposal!

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

2 participants