Skip to content

Commit

Permalink
Looking at -z by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
borismus committed Aug 26, 2016
1 parent 33d69cb commit 3493948
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/webvr-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -4543,8 +4543,8 @@ function ComplementaryFilter(kFilter) {
this.currentGyroMeasurement = new SensorSample();
this.previousGyroMeasurement = new SensorSample();

// Current filter orientation
this.filterQ = new MathUtil.Quaternion();
// Set the quaternion to be looking in the -z direction by default.
this.filterQ = new MathUtil.Quaternion(1, 0, 0, 1);
this.previousFilterQ = new MathUtil.Quaternion();

// Orientation based on the accelerometer.
Expand Down
4 changes: 2 additions & 2 deletions src/sensor-fusion/complementary-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function ComplementaryFilter(kFilter) {
this.currentGyroMeasurement = new SensorSample();
this.previousGyroMeasurement = new SensorSample();

// Current filter orientation
this.filterQ = new MathUtil.Quaternion();
// Set the quaternion to be looking in the -z direction by default.
this.filterQ = new MathUtil.Quaternion(1, 0, 0, 1);
this.previousFilterQ = new MathUtil.Quaternion();

// Orientation based on the accelerometer.
Expand Down

0 comments on commit 3493948

Please sign in to comment.