Browse Source

Fixed VRControls.

Mr.doob 10 years ago
parent
commit
5138a34129
1 changed files with 6 additions and 4 deletions
  1. 6 4
      examples/js/controls/VRControls.js

+ 6 - 4
examples/js/controls/VRControls.js

@@ -77,13 +77,15 @@ THREE.VRControls = function ( object, callback ) {
 
 
 			var vrInput = vrInputs[ i ];
 			var vrInput = vrInputs[ i ];
 
 
-		if ( vrInput.resetSensor !== undefined ) {
+			if ( vrInput.resetSensor !== undefined ) {
 
 
-			vrInput.resetSensor();
+				vrInput.resetSensor();
 
 
-		} else if ( vrInput.zeroSensor !== undefined ) {
+			} else if ( vrInput.zeroSensor !== undefined ) {
 
 
-			vrInput.zeroSensor();
+				vrInput.zeroSensor();
+
+			}
 
 
 		}
 		}