Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

Commit

Permalink
Corrected sensor remap to get proper head tilt values
Browse files Browse the repository at this point in the history
  • Loading branch information
longzheng committed May 21, 2014
1 parent 1384722 commit a32c4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PTVGlass/HeadListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void OnSensorChanged(SensorEvent e)
return;

SensorManager.GetRotationMatrixFromVector(mat, e.Values.ToArray());
SensorManager.RemapCoordinateSystem(mat, Android.Hardware.Axis.X, Android.Hardware.Axis.Y, mat);
SensorManager.RemapCoordinateSystem(mat, Android.Hardware.Axis.X, Android.Hardware.Axis.Z, mat);
SensorManager.GetOrientation(mat, orientation);

float z = orientation[0], // see https://developers.google.com/glass/develop/gdk/location-sensors/index
Expand Down

0 comments on commit a32c4e1

Please sign in to comment.