瀏覽代碼

Merge pull request #1897 from Misterblue/gltf-nodeQRotation

GLTF: Correct initialization of node rotation from quaternion.
David Catuhe 8 年之前
父節點
當前提交
dd21e1f3c1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      loaders/src/glTF/babylon.glTFFileLoader.ts

+ 1 - 1
loaders/src/glTF/babylon.glTFFileLoader.ts

@@ -934,7 +934,7 @@ module BABYLON {
                 var translation = node.translation || [0, 0, 0];
                 var rotation = node.rotation || [0, 0, 0, 1];
                 var scale = node.scale || [1, 1, 1];
-                configureNode(lastNode, Vector3.FromArray(translation), Quaternion.RotationAxis(Vector3.FromArray(rotation).normalize(), rotation[3]), Vector3.FromArray(scale));
+                configureNode(lastNode, Vector3.FromArray(translation), Quaternion.FromArray(rotation), Vector3.FromArray(scale));
             }
 
             lastNode.updateCache(true);