Calculate compass heading from DeviceOrientation Event API

前端 未结 3 1501
孤城傲影
孤城傲影 2020-12-06 08:07

For an augmented reality web app for smartphones I\'m trying to calculate the compass heading when the user is holding the device in their hand, with the screen in a vertica

3条回答
  •  抹茶落季
    2020-12-06 08:21

    I have also played some with the DeviceOrientationEvent (might adopt you formula...) and seen similar problems from time to time. You might wanna try a calibration as in this video. You could search youtube for more examples.

提交回复
热议问题