DistanceJointDef<A extends Body, B extends Body> 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.

Inheritance

Constructors

DistanceJointDef()

Properties

bodyA ↔ A
The first attached body.
getter/setter pairinherited
bodyB ↔ B
The second attached body.
getter/setter pairinherited
collideConnected bool
Set this flag to true if the attached bodies should collide.
getter/setter pairinherited
dampingRatio double
The damping ratio. 0 = no damping, 1 = critical damping.
getter/setter pair
frequencyHz double
The mass-spring-damper frequency in Hertz.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
length double
The equilibrium length between the anchor points.
getter/setter pair
localAnchorA Vector2
The local anchor point relative to body1's origin.
finalinherited
localAnchorB Vector2
The local anchor point relative to body2's origin.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userData Object?
Use this to attach application specific data to your joints.
getter/setter pairinherited

Methods

initialize(A body1, B body2, Vector2 anchor1, Vector2 anchor2) → void
Initialize the bodies, anchors, and length using the world anchors.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited