Procházet zdrojové kódy

Don't use accessor min/max for rigged meshes

Popov72 před 5 roky
rodič
revize
c662e3d749
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      loaders/src/glTF/2.0/glTFLoader.ts

+ 1 - 1
loaders/src/glTF/2.0/glTFLoader.ts

@@ -690,7 +690,7 @@ export class GLTFLoader implements IGLTFLoader {
             const min = TmpVectors.Vector3[0], max = TmpVectors.Vector3[1];
             this._forEachPrimitive(node, (babylonMesh) => {
                 let recomputeBoundingInfo = true;
-                if (!this.parent.alwaysComputeBoundingBox) {
+                if (!this.parent.alwaysComputeBoundingBox && !babylonMesh.skeleton) {
                     const tmp = GLTFLoader.GetTmpMetadata(babylonMesh);
                     const mmin: [number, number, number] = tmp.positionMin, mmax: [number, number, number] = tmp.positionMax;
                     if (mmin !== undefined && mmax !== undefined) {