Просмотр исходного кода

Merge pull request #5784 from TrevorDev/revertOimoMotor

revert oimo breaking change
David Catuhe 6 лет назад
Родитель
Сommit
541c6b526b
2 измененных файлов с 2 добавлено и 4 удалено
  1. 1 1
      dist/preview release/what's new.md
  2. 1 3
      src/Physics/Plugins/oimoJSPlugin.ts

+ 1 - 1
dist/preview release/what's new.md

@@ -151,7 +151,7 @@
 - Fix more case sensitive paths ([mrdunk](https://github.com))
 - Fix more case sensitive paths ([mrdunk](https://github.com))
 - Attaching a BoundingBoxGizmo on a child should not remove its parent ([TrevorDev](https://github.com/TrevorDev)))
 - Attaching a BoundingBoxGizmo on a child should not remove its parent ([TrevorDev](https://github.com/TrevorDev)))
 - AmmoJS fix include issue caused after modules update and use world contact point to be consistent with oimo and cannon ([TrevorDev](https://github.com/TrevorDev)))
 - AmmoJS fix include issue caused after modules update and use world contact point to be consistent with oimo and cannon ([TrevorDev](https://github.com/TrevorDev)))
-- Oimo disable motor maxForce, cannonJS support no impostor, cannonJS cylinder axis, ammoJS wake up impostor when apply force/impulse ([TrevorDev](https://github.com/TrevorDev)))
+- Warn of motor with maxForce in Oimo, cannonJS support no impostor, cannonJS cylinder axis, ammoJS wake up impostor when apply force/impulse ([TrevorDev](https://github.com/TrevorDev)))
 - Utility layer should render on last active camera ([TrevorDev](https://github.com/TrevorDev))
 - Utility layer should render on last active camera ([TrevorDev](https://github.com/TrevorDev))
 
 
 ### Core Engine
 ### Core Engine

+ 1 - 3
src/Physics/Plugins/oimoJSPlugin.ts

@@ -423,11 +423,9 @@ export class OimoJSPlugin implements IPhysicsEnginePlugin {
     }
     }
 
 
     public setMotor(joint: IMotorEnabledJoint, speed: number, maxForce?: number, motorIndex?: number) {
     public setMotor(joint: IMotorEnabledJoint, speed: number, maxForce?: number, motorIndex?: number) {
-        // Keep defaults consistant with other physics plugins
         if (maxForce !== undefined) {
         if (maxForce !== undefined) {
-            Logger.Warn("OimoJS plugin does not support setMotor with maxForce");
+            Logger.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with maxForce parameter");
         }
         }
-        maxForce = 1e6;
         speed *= -1;
         speed *= -1;
 
 
         //TODO separate rotational and transational motors.
         //TODO separate rotational and transational motors.