I go back to you to know if you can improve DeviceOrientationCamera for allowing to recover the real orientation North / South.
That would be great, and useful for many applications.
I have already demonstrated a proof of concept to allow our students to be oriented on campus by scanning QR codes. But to have a correct orientation, students must remain facing the QRCodes until the program is initialized.
In the state, I, unfortunately, can’t go beyond that
Thank you in advance for your feedback, which I hope will be positive.
I am trying to use this feature too! And I already mount some code to it, PG Sample but I do not know how to set the Device Orientation camera with the heading/North result from device compass!
Before I chekout source code of device orientaiton camera can someone tell me what web api it uses: device orientation & device motion events or sensor api’s orientation interface (virtual fusion sensors: absolute and relative orientation sensors).
If one day it becomes possible to have a “pointToNorth” function, it will open up great possibilities.
I hope we can find a source that will allow us to do that.
Actually you can do that. The info Babylonjs device orientation specifc camera is fed by may have the absolute orientation, ie. the orientation wrt the North, if your device is capable of determining it. For example, If it has a magnetometer it can.
@NRA your PG may use that property alongside the webkitCompassHeading you employ. It may have a wider support range. You can know how many angles your alpha angle is away from the North if the absolute is true at any time, so you can iplement your own pointToNorth function.