Browse Source

comment + typo

Julien Barrois 6 years ago
parent
commit
866a6596c9
1 changed files with 2 additions and 1 deletions
  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();
                 if (oldPivot) {
+                    // create a copy the pivot Matrix as it is modified in place
                     oldPivot = oldPivot.clone()
                 }
                 else {
-                     Matrix.Identity();
+                    oldPivot = Matrix.Identity();
                 }
 
                 //calculate the new center using a pivot (since this.BJSCANNON.js doesn't center height maps)