Browse Source

Merge pull request #5486 from dmarcos/zeroSensor

Adds method to zero VR sensors
Mr.doob 10 years ago
parent
commit
1445276deb
1 changed files with 8 additions and 0 deletions
  1. 8 0
      examples/js/controls/VRControls.js

+ 8 - 0
examples/js/controls/VRControls.js

@@ -54,4 +54,12 @@ THREE.VRControls = function ( object, callback ) {
 
 
 	};
 	};
 
 
+	this.zeroSensor = function () {
+
+		if ( vrInput === undefined ) return;
+
+		vrInput.zeroSensor();
+
+	};
+
 };
 };