Explorar o código

Merge pull request #3456 from BabylonJS/master

Deploy
David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
7f93599f9d
Modificáronse 2 ficheiros con 4 adicións e 1 borrados
  1. BIN=BIN
      Playground/textures/normal.png
  2. 4 1
      src/Mesh/babylon.transformNode.ts

BIN=BIN
Playground/textures/normal.png


+ 4 - 1
src/Mesh/babylon.transformNode.ts

@@ -119,7 +119,7 @@ module BABYLON {
          */
          */
         protected _getWorldMatrixDeterminant(): number {
         protected _getWorldMatrixDeterminant(): number {
             if (this._currentRenderId !== this.getScene().getRenderId()) {
             if (this._currentRenderId !== this.getScene().getRenderId()) {
-                this._worldMatrixDeterminant = this.computeWorldMatrix().determinant();
+                this.computeWorldMatrix();
             }
             }
             return this._worldMatrixDeterminant;
             return this._worldMatrixDeterminant;
         }
         }
@@ -835,6 +835,9 @@ module BABYLON {
                 this._poseMatrix = Matrix.Invert(this._worldMatrix);
                 this._poseMatrix = Matrix.Invert(this._worldMatrix);
             }
             }
 
 
+            // Cache the determinant
+            this._worldMatrixDeterminant = this._worldMatrix.determinant();
+
             return this._worldMatrix;
             return this._worldMatrix;
         }
         }