فهرست منبع

comment + typo

Julien Barrois 6 سال پیش
والد
کامیت
866a6596c9
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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)