Ver código fonte

replaces setRotationFromQuaternion with quaternion.fromArray

Diego Marcos 11 anos atrás
pai
commit
82f4739614
1 arquivos alterados com 1 adições e 7 exclusões
  1. 1 7
      examples/js/controls/VRControls.js

+ 1 - 7
examples/js/controls/VRControls.js

@@ -45,13 +45,7 @@ THREE.VRControls = function ( camera, done ) {
 		}
 		// Applies head rotation from sensors data.
 		if ( camera ) {
-			quat = new THREE.Quaternion(
-				vrState.hmd.rotation[0],
-				vrState.hmd.rotation[1],
-				vrState.hmd.rotation[2],
-				vrState.hmd.rotation[3]
-			);
-			camera.setRotationFromQuaternion( quat );
+			camera.quaternion.fromArray( vrState.hmd.rotation );
 		}
 	};