Parcourir la source

Fix bug in getWorldExtends

Gary Hsu il y a 7 ans
Parent
commit
7c5ae41f70
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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;