Browse Source

DaydreamController: Bugfix angularVelocity

Mugen87 8 years ago
parent
commit
408a44b305
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/vr/DaydreamController.js

+ 1 - 1
examples/js/vr/DaydreamController.js

@@ -66,7 +66,7 @@ THREE.DaydreamController = function () {
 
 
 			// angular velocity
 			// angular velocity
 
 
-			if ( pose.angularVelocity !== null || ! angularVelocity.equals( pose.angularVelocity ) ) {
+			if ( pose.angularVelocity !== null && ! angularVelocity.equals( pose.angularVelocity ) ) {
 
 
 				angularVelocity.fromArray( pose.angularVelocity );
 				angularVelocity.fromArray( pose.angularVelocity );
 				scope.dispatchEvent( { type: 'angularvelocitychanged', angularVelocity: angularVelocity } );
 				scope.dispatchEvent( { type: 'angularvelocitychanged', angularVelocity: angularVelocity } );