Skip to content

Reimplementation of device orientation code - iOS/Safari user participation needed! #302

@nickw1

Description

@nickw1

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Rotation of AR view is often 90 degrees out on Firefox (but not consistently).

If the current behavior is a bug, please provide the steps to reproduce.

Try a location-based example, such as https://hikar.org/webapp/ (in Europe and Turkey), on Firefox, you will find that the augmented content might be 90 degrees out.

Investigating this issue

I'd like to investigate this issue a bit further, to find out whether it is within AR.js or whether it is in the THREE.js DeviceOrientationControls used by A-Frame to perform automatic rotation based on the compass and accelerometer sensors.

To do this I have created a very simple pure A-Frame (no ar.js) example here:
https://hikar.org/aframe/

Please try this on your own device, in a location where you will not get magnetic interference, and see if you get the expected behaviour, which is:

  • Red sphere to your north
  • Green sphere to your east
  • Yellow sphere to your south
  • Blue sphere to your west

Please report the behaviour on your device, stating device, operating system and critically, browser and version. Note on Firefox you have to tap the screen to start the auto-rotation.

If this works for most devices, we know the problem is in AR.js. If it frequently fails on Firefox, we know the problem may well be with DeviceOrientationControls.

I will start by reporting expected behaviour unexpected behaviour: sometimes the spheres are 180 degrees out on

  • Chrome 91, Android 11, Pixel 3
  • Firefox 89, Android 11, Pixel 3

Thanks. The more reports we get, the more we can be sure whether the issue is likely to be within AR.js or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions