Explorar o código

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe %!s(int64=6) %!d(string=hai) anos
pai
achega
699b3f0c01
Modificáronse 2 ficheiros con 9 adicións e 9 borrados
  1. 1 1
      dist/preview release/what's new.md
  2. 8 8
      src/Physics/physicsJoint.ts

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

@@ -157,7 +157,7 @@
 - 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)))
 - 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)))
-- Warn of motor with maxForce in Oimo and set default force to be consistent with others, 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 plugin and set default force to be consistent with others, 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))
 - PointerDragBehavior should not let the drag plane get out of sync when rotating the object during dragging ([TrevorDev](https://github.com/TrevorDev))
 - Do not crash the application if webVR submitFrame fails ([TrevorDev](https://github.com/TrevorDev))

+ 8 - 8
src/Physics/physicsJoint.ts

@@ -257,14 +257,14 @@ export class Hinge2Joint extends MotorEnabledJoint {
     }
 
     /**
-     * Set the motor values.
-     * Attention, this function is plugin specific. Engines won't react 100% the same.
-     * @param {number} force the force to apply
-     * @param {number} maxForce max force for this motor.
-     * @param {motorIndex} the motor's index, 0 or 1.
-     */
-    public setMotor(force?: number, maxForce?: number, motorIndex: number = 0) {
-        this._physicsPlugin.setMotor(this, force || 0, maxForce, motorIndex);
+    * Set the motor values.
+    * Attention, this function is plugin specific. Engines won't react 100% the same.
+    * @param {number} targetSpeed the speed the motor is to reach
+    * @param {number} maxForce max force for this motor.
+    * @param {motorIndex} the motor's index, 0 or 1.
+    */
+    public setMotor(targetSpeed?: number, maxForce?: number, motorIndex: number = 0) {
+        this._physicsPlugin.setMotor(this, targetSpeed || 0, maxForce, motorIndex);
     }
 
     /**