Quellcode durchsuchen

center of mass term used instead of body position

Cedric Guillemet vor 5 Jahren
Ursprung
Commit
ad2e1152b7
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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());
             }