瀏覽代碼

Fix bug in getHierarchyBoundingVectors

Gary Hsu 7 年之前
父節點
當前提交
58297ad807
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Mesh/babylon.abstractMesh.ts

+ 2 - 2
src/Mesh/babylon.abstractMesh.ts

@@ -904,14 +904,14 @@
                 for (var descendant of descendants) {
                     let childMesh = <AbstractMesh>descendant;
 
+                    childMesh.computeWorldMatrix(true);
+
                     //make sure we have the needed params to get mix and max
                     if (!childMesh.getBoundingInfo || childMesh.getTotalVertices() === 0) {
                         continue;
                     }
 
-                    childMesh.computeWorldMatrix(true);
                     let childBoundingInfo = childMesh.getBoundingInfo();
-
                     let boundingBox = childBoundingInfo.boundingBox;
 
                     var minBox = boundingBox.minimumWorld;