Преглед изворни кода

Remove redundant userHeight

Diego Marcos пре 7 година
родитељ
комит
f19cfa3068
2 измењених фајлова са 2 додато и 6 уклоњено
  1. 1 1
      examples/js/vr/ViveController.js
  2. 1 5
      src/renderers/webvr/WebVRManager.js

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

@@ -72,7 +72,7 @@ THREE.ViveController = function ( id ) {
 			if ( pose.position !== null ) scope.position.fromArray( pose.position );
 			if ( pose.position !== null ) scope.position.fromArray( pose.position );
 			if ( pose.orientation !== null ) scope.quaternion.fromArray( pose.orientation );
 			if ( pose.orientation !== null ) scope.quaternion.fromArray( pose.orientation );
 			scope.matrix.compose( scope.position, scope.quaternion, scope.scale );
 			scope.matrix.compose( scope.position, scope.quaternion, scope.scale );
-			scope.matrix.multiplyMatrices( scope.standingMatrix, scope.matrix );
+			scope.matrix.premultiply( scope.standingMatrix );	
 			scope.matrixWorldNeedsUpdate = true;
 			scope.matrixWorldNeedsUpdate = true;
 			scope.visible = true;
 			scope.visible = true;
 
 

+ 1 - 5
src/renderers/webvr/WebVRManager.js

@@ -112,11 +112,7 @@ function WebVRManager( renderer ) {
 
 
 			poseObject.position.fromArray( pose.position );
 			poseObject.position.fromArray( pose.position );
 
 
-		} else {
-
-			poseObject.position.set( 0, scope.userHeight, 0 );
-
-		}
+		} 
 
 
 		if ( pose.orientation !== null ) {
 		if ( pose.orientation !== null ) {