瀏覽代碼

Merge pull request #3456 from BabylonJS/master

Deploy
David Catuhe 7 年之前
父節點
當前提交
7f93599f9d
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 二進制
      Playground/textures/normal.png
  2. 4 1
      src/Mesh/babylon.transformNode.ts

二進制
Playground/textures/normal.png


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

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