DistanceJoint limiting the distance between two local anchor points of Bodies.

The equation for this constraint could be written like:

jointMin <= distance(body2.localPointToWorld(anchor2), body1.localPointToWorld(anchor1)) <= jointMaxThis joint is not designed to work when

` jointMin = jointMax = 0 `

and constraint is
stiff. In this instance you should use a PivotJoint instead.### Constructor

`new(body1:Null<Body>, body2:Null<Body>, anchor1:Vec2, anchor2:Vec2, jointMin:Float, jointMax:Float)`

Construct a new DistanceJoint.

Parameters:

`body1` | The first body in DistanceJoint. |
---|---|

`body2` | The second body in DistanceJoint. |

`anchor1` | The first local anchor for joint. |

`anchor2` | The second local anchor for joint. |

`jointMin` | The lower bound for constraint. |

`jointMax` | The upper bound for constraint. |

Returns:

The constructed DistanceJoint.

### Variables

First Body in constraint.

This value may be null, but trying to simulate the constraint whilst
this body is null will result in an error.

Second Body in constraint.

This value may be null, but trying to simulate the constraint whilst
this body is null will result in an error.