-
Notifications
You must be signed in to change notification settings - Fork 929
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
Location based compass orientation is incorrect. It always says North is direction when starting up. #590
Comments
It looks to me like iOS no longer supports the compass deviceorientationabsolute event. It only supports the deviceorientation event and that seems to reset with the context in some way. In the basic example when you tap on a cube when it returns the device orientation resets with alpha = 0 regardless of the direction facing. |
It appears that this is know. There was a MR that was not merged that seems to help but enabling the webkitcompassheading. #466 |
For additional context: this appears to be a known problem in some Android devices, so much so that the DeviceOrientationControls object has been removed from the offical three.js repository. Unfortunately it seems that for certain Android phones it may not be possible to obtain reliable North via the Web device orientation API. Hopefully this is only a minority of devices, though. |
Just an update on this: there is now a separate project for location-based AR (only) within AR.js where any future work to resolve, or find workarounds for at least (as they may be an inherent problem with the device), these kinds of bugs will be done: |
Bug. There are similar issue but all marked as closed, incorrectly.
What is the current behavior?
Currently on iOS (Safari and Chrome tested) the simple location examples will always point the north cube in the direction the phone is facing after any interaction or started.
If the current behavior is a bug, please provide the steps to reproduce.
Load the basic example
https://github.com/AR-js-org/AR.js/blob/master/aframe/examples/new-location-based/basic-js/index.html
On iOS at startup there will always be several permissions popups. After hitting them all you will see the Red cube (North) in the direction of whatever you started. If you tap the cube or any cube, you will get a popup and then the orientation will reset so that direction is North and the Red Cube is there.
It is always happening with the included example. I put a copy on website at www.pasotours.com/location2
Please mention other relevant information such as the browser version, Operating System and Device Name
iOS (Chrome and Safari) it works correctly on android.
What is the expected behavior?
If this is a feature request, what is motivation or use case for changing the behavior?
The text was updated successfully, but these errors were encountered: