/// <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; }
/// <summary> /// Use this to update the target point. /// </summary> public void SetTarget(Vec2 target) { if (Body2.IsSleeping()) { Body2.WakeUp(); } Target = target; }
/// <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; }
/// <summary> /// Enable/disable the joint motor. /// </summary> public void EnableMotor(bool flag) { Body1.WakeUp(); Body2.WakeUp(); IsMotorEnabled = flag; }
/// <summary> /// Enable/disable the joint limit. /// </summary> public void EnableLimit(bool flag) { Body1.WakeUp(); Body2.WakeUp(); IsLimitEnabled = flag; }
/// <summary> /// Set the motor speed, usually in meters per second. /// </summary> public void SetMotorSpeed(float speed) { Body1.WakeUp(); Body2.WakeUp(); MotorSpeed = speed; }
/// <summary> /// Enable/disable the joint motor. /// </summary> public void EnableMotor(bool flag) { Body1.WakeUp(); Body2.WakeUp(); EnableMotorx = flag; }
/// <summary> /// Enable/disable the joint limit. /// </summary> public void EnableLimit(bool flag) { Body1.WakeUp(); Body2.WakeUp(); EnableLimitx = flag; }
/// <summary> /// Set the maximum motor torque, usually in N-m. /// </summary> public void SetMaxMotorTorque(float torque) { Body1.WakeUp(); Body2.WakeUp(); MaxMotorTorque = torque; }