| Package | Box2D.Dynamics.Joints |
| Class | public class b2DistanceJointDef |
| Inheritance | b2DistanceJointDef b2JointDef |
| Source | b2DistanceJointDef.as |
Warning: Do not use a zero or short length.
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | bodyA : b2Body
The first attached body.
| b2JointDef | |
![]() | bodyB : b2Body
The second attached body.
| b2JointDef | |
![]() | collideConnected : Boolean
Set this flag to true if the attached bodies should collide.
| b2JointDef | |
| dampingRatio : Number
The damping ratio.
| b2DistanceJointDef | ||
| frequencyHz : Number
The mass-spring-damper frequency in Hertz.
| b2DistanceJointDef | ||
| length : Number
The natural length between the anchor points.
| b2DistanceJointDef | ||
| localAnchorA : b2Vec2
The local anchor point relative to body1's origin.
| b2DistanceJointDef | ||
| localAnchorB : b2Vec2
The local anchor point relative to body2's origin.
| b2DistanceJointDef | ||
![]() | type : int
The joint type is set automatically for concrete joint types.
| b2JointDef | |
![]() | userData : *
Use this to attach application specific data to your joints.
| b2JointDef | |
| Method | Defined by | ||
|---|---|---|---|
| b2DistanceJointDef | |||
|
Initialize the bodies, anchors, and length using the world
anchors.
| b2DistanceJointDef | ||
| dampingRatio | property |
public var dampingRatio:NumberThe damping ratio. 0 = no damping, 1 = critical damping.
| frequencyHz | property |
public var frequencyHz:NumberThe mass-spring-damper frequency in Hertz.
| length | property |
public var length:NumberThe natural length between the anchor points.
| localAnchorA | property |
public var localAnchorA:b2Vec2The local anchor point relative to body1's origin.
| localAnchorB | property |
public var localAnchorB:b2Vec2The local anchor point relative to body2's origin.
| b2DistanceJointDef | () | constructor |
public function b2DistanceJointDef()
| Initialize | () | method |
public function Initialize(bA:b2Body, bB:b2Body, anchorA:b2Vec2, anchorB:b2Vec2):voidInitialize the bodies, anchors, and length using the world anchors.
ParametersbA:b2Body |
|
bB:b2Body |
|
anchorA:b2Vec2 |
|
anchorB:b2Vec2 |