|
@@ -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);
|
|
|
}
|
|
|
|
|
|
/**
|