Browse Source

Merge pull request #3737 from bghgary/getWorldExtends-fix

Fix bug in getWorldExtends
David Catuhe 7 năm trước cách đây
mục cha
commit
f1ec30dcc3
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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;