Example #1
0
 /// <summary>
 ///     Set the joint limits, usually in meters.
 /// </summary>
 public void SetLimits(float lower, float upper)
 {
     Box2DxDebug.Assert(lower <= upper);
     Body1.WakeUp();
     Body2.WakeUp();
     LowerLimit = lower;
     UpperLimit = upper;
 }
Example #2
0
 /// <summary>
 ///     Set the maximum motor force, usually in N.
 /// </summary>
 public void SetMaxMotorForce(float force)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MaxMotorForce = Settings.FORCE_SCALE(1.0f) * force;
 }
Example #3
0
 /// <summary>
 ///     Enable/disable the joint motor.
 /// </summary>
 public void EnableMotor(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     IsMotorEnabled = flag;
 }
Example #4
0
 /// <summary>
 ///     Enable/disable the joint limit.
 /// </summary>
 public void EnableLimit(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     IsLimitEnabled = flag;
 }
Example #5
0
 /// <summary>
 ///     Set the motor speed, usually in meters per second.
 /// </summary>
 public void SetMotorSpeed(float speed)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MotorSpeed = speed;
 }
Example #6
0
 /// <summary>
 ///     Enable/disable the joint motor.
 /// </summary>
 public void EnableMotor(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     EnableMotorx = flag;
 }
Example #7
0
 /// <summary>
 ///     Enable/disable the joint limit.
 /// </summary>
 public void EnableLimit(bool flag)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     EnableLimitx = flag;
 }
Example #8
0
 /// <summary>
 ///     Set the maximum motor torque, usually in N-m.
 /// </summary>
 public void SetMaxMotorTorque(float torque)
 {
     Body1.WakeUp();
     Body2.WakeUp();
     MaxMotorTorque = torque;
 }