How to use onSensorChanged sensor data in combination with OpenGL

后端 未结 6 1666
天涯浪人
天涯浪人 2020-12-07 10:05

( edit: I added the best working approach in my augmented reality framework and now also take the gyroscope into account which makes it much more stable again: Droid

6条回答
  •  时光说笑
    2020-12-07 10:20

    Check out the Sensor fusion demo app which uses different sensors (gyroscope, rotation-vector, accelerometer + compass, etc.) and renders the outputs from the onSensorChanged-events as a coloured cube that rotates accordingly to your phone.

    The results from those events are stored as quaternions and rotation matrices and used in this class which OpenGL.

提交回复
热议问题