-
-
Save baharev/ca5d658eae72cf063bbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SensorManager.getRotationMatrixFromVector(rotationMatrix, sensorValues); | |
SensorManager.getAngleChange(orientationValues, rotationMatrix, prevMatrix); | |
final float SCALE = 1.0f; // Please experiment with several scales: 0.1f, 1.0f, 10.f, etc. | |
pixel.x += orientationValues[0] * SCALE; | |
pixel.y += orientationValues[1] * SCALE; // in the video, the indices were swapped, perhaps that matters? | |
prevMatrix = rotationMatrix; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment