Explorar el Código

Merge pull request #10319 from takahirox/FixGLTFSkinningBug

Fix GLTF Skinning bug
Mr.doob hace 8 años
padre
commit
ec43b33fd1
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      examples/js/loaders/GLTFLoader.js

+ 3 - 2
examples/js/loaders/GLTFLoader.js

@@ -217,12 +217,13 @@ THREE.GLTFLoader = ( function () {
 
 						// So it goes like this:
 						// SkinnedMesh world matrix is already baked into MODELVIEW;
-						// ransform joints to local space,
+						// transform joints to local space,
 						// then transform using joint's inverse
 						m4v[ mi ]
 							.getInverse( boundUniform.sourceNode.matrixWorld )
 							.multiply( boundUniform.targetNode.skeleton.bones[ mi ].matrixWorld )
-							.multiply( boundUniform.targetNode.skeleton.boneInverses[ mi ] );
+							.multiply( boundUniform.targetNode.skeleton.boneInverses[ mi ] )
+							.multiply( boundUniform.targetNode.bindMatrix );
 
 					}