DistanceJoint constructor

DistanceJoint(
  1. JointConfig config, [
  2. double minDistance = 0,
  3. double maxDistance = 0
])

A distance joint limits the distance between two anchor points on rigid bodies.

config configuration profile of the joint

minDistance the min distance the motor will travel

maxDistance the max distance the motor will travel

Implementation

DistanceJoint(JointConfig config, [double minDistance = 0, double maxDistance = 0]):super(config){
  type = JointType.distance;
  limitMotor = LimitMotor(nor, true);
  limitMotor.lowerLimit = minDistance;
  limitMotor.upperLimit = maxDistance;
  t = TranslationalConstraint(this, limitMotor);
}