Set Phone orientation sensor absolute

Dear Friends, I try to use DeviceSensors::OrientationAlpha() to create a compass. I actually copied the example but there is an issue. when you load the game 0 degrees is the direction you are pointing at and has nothing to do with the real North. when you rotate the phone you get a relative reading from where you started. Reading the Wiki I see that there is an Expressions Is Absolute. I quote “;This value indicates that the orientation data is in absolute values. In reference to the Earth’s coordinates (value 1) or using an arbitrary frame, is determined by the device (value 0).”;

I need to set to “1”; but how do I do this.

Regards,

Michel

Bonsoir Michel,

You’ll find some details here: DeviceOrientationEvent - Web APIs | MDN
IsAbsolute is a read-only boolean, so it cannot be set.
Are you using an APK or viewing inside a browser?

Dear Gruk,

Thanks for your reply. Your suggestion is just to add a javascript block and read out the DeviceOrientationEvent.webkitCompassHeading and put it in a scene variable. This is what will do and report back

Regards,

Michel