Julien Barrois 6 gadi atpakaļ
vecāks
revīzija
866a6596c9
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      src/Physics/Plugins/babylon.cannonJSPlugin.ts

+ 2 - 1
src/Physics/Plugins/babylon.cannonJSPlugin.ts

@@ -437,10 +437,11 @@ module BABYLON {
 
 
                 var oldPivot = mesh.getPivotMatrix();
                 var oldPivot = mesh.getPivotMatrix();
                 if (oldPivot) {
                 if (oldPivot) {
+                    // create a copy the pivot Matrix as it is modified in place
                     oldPivot = oldPivot.clone()
                     oldPivot = oldPivot.clone()
                 }
                 }
                 else {
                 else {
-                     Matrix.Identity();
+                    oldPivot = Matrix.Identity();
                 }
                 }
 
 
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)