DistanceJointDef

constructor(bodyA: Body, bodyB: Body, localAnchorA: Vec2 = Vec2.Zero, localAnchorB: Vec2 = Vec2.Zero, length: Float = 1.0f, enableSpring: Boolean = false, hertz: Float = 0.0f, dampingRatio: Float = 0.0f, enableLimit: Boolean = false, minLength: Float = 0.0f, maxLength: Float = B2_HUGE, enableMotor: Boolean = false, maxMotorForce: Float = 0.0f, motorSpeed: Float = 0.0f, collideConnected: Boolean = false)

Parameters

bodyA

The first attached body

bodyB

The second attached body

localAnchorA

The local anchor point relative to bodyA's origin

localAnchorB

The local anchor point relative to bodyB's origin

length

The rest length of this joint (distance between anchors). Clamped to a stable minimum value.