DistanceJointDef class

Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game.

@warning Do not use a zero or short length.





bodyA Body
The first attached body.
read / write, inherited
bodyB Body
The second attached body.
read / write, inherited
collideConnected bool
Set this flag to true if the attached bodies should collide.
read / write, inherited
dampingRatio double
The damping ratio. 0 = no damping, 1 = critical damping.
read / write
frequencyHz double
The mass-spring-damper frequency in Hertz.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
length double
The equilibrium length between the anchor points.
read / write
localAnchorA Vector2
The local anchor point relative to body1's origin.
localAnchorB Vector2
The local anchor point relative to body2's origin.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type JointType
The joint type is set automatically for concrete joint types.
read / write, inherited
userData Object
Use this to attach application specific data to your joints.
read / write, inherited


initialize(Body b1, Body b2, Vector2 anchor1, Vector2 anchor2) → void
Initialize the bodies, anchors, and length using the world anchors. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]