Przeglądaj źródła

Merge pull request #3737 from bghgary/getWorldExtends-fix

Fix bug in getWorldExtends
David Catuhe 7 lat temu
rodzic
commit
f1ec30dcc3
1 zmienionych plików z 2 dodań i 1 usunięć
  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++) {
             for (var index = 0; index < this.meshes.length; index++) {
                 var mesh = this.meshes[index];
                 var mesh = this.meshes[index];
 
 
+                mesh.computeWorldMatrix(true);
+
                 if (!mesh.subMeshes || mesh.subMeshes.length === 0 || mesh.infiniteDistance) {
                 if (!mesh.subMeshes || mesh.subMeshes.length === 0 || mesh.infiniteDistance) {
                     continue;
                     continue;
                 }
                 }
 
 
-                mesh.computeWorldMatrix(true);
                 let boundingInfo = mesh.getBoundingInfo();
                 let boundingInfo = mesh.getBoundingInfo();
 
 
                 var minBox = boundingInfo.boundingBox.minimumWorld;
                 var minBox = boundingInfo.boundingBox.minimumWorld;