Skip to content

DeviceOrientationControls iOS initial heading/alpha correction #466

Open
@spoxies

Description

@spoxies

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

Bug

What is the current behavior?

On iOS using DeviceOrientationControls, the 'north' is set to whatever direction you happen face when initialising the controls.
This issue belongs to a PR #467 (maybe first merge #464).

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

Get a iOS device and run the AR-js-org sample code (examples/location-based). You will find that the north (alpha) will be set to 0 whatever direction you are facing at that time.

https://github.com/WebKit/webkit/blob/main/Source/WebCore/platform/ios/WebCoreMotionManager.mm

Please mention other relevant information such as the browser version, Operating System and Device Name

iOS 13 until iOS 16 (tested). Luckily a lot of the work had been done mrdoob/three.js@34c6810, https://github.com/MasterJames/three.js/commit/208b9753777f81692a2ecedfa74f520b8299981a. But that was later removed/cleaned/overlooked in the original Three.js mrdoob/three.js#13000. But it is still relevant and a minor fix.

What is the expected behavior?

The scene should match and be facing, the correct direction.

If this is a feature request, what is motivation or use case for changing the behavior?

Add support to WebKit/iOS for DeviceOrientationControls

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingiOSall about iOS deviceslocation based

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions