-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix sensors on android web #4499
Conversation
2c70854
to
a57b2c3
Compare
a57b2c3
to
1abd6a3
Compare
59f8bf2
to
ed1d4d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on iOS and Android, looks like finally it's consistent. Thanks @mstach60161 for taking care of this!
Edit: I've tested pitch
, roll
and yaw
between main and this branch and they are the same but I haven't checked qx
, qy
, qz
and qw
individually, is this the expected result?
Edit 2: Ready to merge.
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary ### Problem Android devices use a right-handed coordinate system, where the positive x-axis points to the right, the positive y-axis points up, and the positive z-axis points out of the screen. However iOS uses a left-handed coordinate system, where the positive x-axis points to the right, the positive y-axis points down, and the positive z-axis points into the screen. This is already fixed on android native code, but the problem still exists on android web browser (react native web). ### Fix - Replace quaternion z, y and negate z - Do the same thing on Android native ## Test plan - Web Example App
Summary
Problem
Android devices use a right-handed coordinate system, where the positive x-axis points to the right, the positive y-axis points up, and the positive z-axis points out of the screen.
However iOS uses a left-handed coordinate system, where the positive x-axis points to the right, the positive y-axis points down, and the positive z-axis points into the screen.
This is already fixed on android native code, but the problem still exists on android web browser (react native web).
Fix
Test plan