瀏覽代碼

Merge pull request #3737 from bghgary/getWorldExtends-fix

Fix bug in getWorldExtends
David Catuhe 7 年之前
父節點
當前提交
f1ec30dcc3
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/babylon.scene.ts

+ 2 - 1
src/babylon.scene.ts

@@ -4232,11 +4232,12 @@
             for (var index = 0; index < this.meshes.length; index++) {
                 var mesh = this.meshes[index];
 
+                mesh.computeWorldMatrix(true);
+
                 if (!mesh.subMeshes || mesh.subMeshes.length === 0 || mesh.infiniteDistance) {
                     continue;
                 }
 
-                mesh.computeWorldMatrix(true);
                 let boundingInfo = mesh.getBoundingInfo();
 
                 var minBox = boundingInfo.boundingBox.minimumWorld;