瀏覽代碼

center of mass term used instead of body position

Cedric Guillemet 5 年之前
父節點
當前提交
ad2e1152b7
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Physics/Plugins/ammoJSPlugin.ts

+ 2 - 2
src/Physics/Plugins/ammoJSPlugin.ts

@@ -341,7 +341,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
             var worldPoint = this._tmpAmmoVectorA;
             var impulse = this._tmpAmmoVectorB;
 
-            // Convert contactPoint relative to body position
+            // Convert contactPoint relative to center of mass
             if (impostor.object && impostor.object.getWorldMatrix) {
                 contactPoint.subtractInPlace(impostor.object.getWorldMatrix().getTranslation());
             }
@@ -368,7 +368,7 @@ export class AmmoJSPlugin implements IPhysicsEnginePlugin {
             var worldPoint = this._tmpAmmoVectorA;
             var impulse = this._tmpAmmoVectorB;
 
-            // Convert contactPoint relative to body position
+            // Convert contactPoint relative to center of mass
             if (impostor.object && impostor.object.getWorldMatrix) {
                 contactPoint.subtractInPlace(impostor.object.getWorldMatrix().getTranslation());
             }