Parcourir la source

fixed missing inverse calculations

Karl Haubenwallner il y a 5 ans
Parent
commit
801daed446
2 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 2 0
      examples/js/loaders/FBXLoader.js
  2. 2 0
      examples/jsm/loaders/FBXLoader.js

+ 2 - 0
examples/js/loaders/FBXLoader.js

@@ -4019,6 +4019,8 @@ THREE.FBXLoader = ( function () {
 
 		}
 
+		var lRotationPivotM_inv = new Matrix4().getInverse( lRotationPivotM );
+		var lScalingPivotM_inv = new Matrix4().getInverse( lScalingPivotM );
 		// Calculate the local transform matrix
 		var lTransform = new Matrix4();
 		lTransform.multiply( lTranslationM ).multiply( lRotationOffsetM ).multiply( lRotationPivotM ).multiply( lPreRotationM ).multiply( lRotationM ).multiply( lPostRotationM ).multiply( lRotationPivotM_inv ).multiply( lScalingOffsetM ).multiply( lScalingPivotM ).multiply( lScalingM ).multiply( lScalingPivotM_inv );

+ 2 - 0
examples/jsm/loaders/FBXLoader.js

@@ -4066,6 +4066,8 @@ var FBXLoader = ( function () {
 
 		}
 
+		var lRotationPivotM_inv = new Matrix4().getInverse( lRotationPivotM );
+		var lScalingPivotM_inv = new Matrix4().getInverse( lScalingPivotM );
 		// Calculate the local transform matrix
 		var lTransform = new Matrix4();
 		lTransform.multiply( lTranslationM ).multiply( lRotationOffsetM ).multiply( lRotationPivotM ).multiply( lPreRotationM ).multiply( lRotationM ).multiply( lPostRotationM ).multiply( lRotationPivotM_inv ).multiply( lScalingOffsetM ).multiply( lScalingPivotM ).multiply( lScalingM ).multiply( lScalingPivotM_inv );