Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

Index

Constructors

Properties

bodyA: b2Body

The first attached body.

bodyB: b2Body

The second attached body.

collideConnected: boolean

Set this flag to true if the attached bodies should collide.

dampingRatio: number

The damping ratio. 0 = no damping, 1 = critical damping.

frequencyHz: number

The mass-spring-damper frequency in Hertz.

length: number

The natural length between the anchor points.

localAnchorA: b2Vec2

The local anchor point relative to body1's origin.

localAnchorB: b2Vec2

The local anchor point relative to body2's origin.

type: number

The joint type is set automatically for concrete joint types.

userData: any

Use this to attach application specific data to your joints.

Methods

Generated using TypeDoc