Options
All
  • Public
  • Public/Protected
  • All
Menu

Line joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.

Hierarchy

Index

Constructors

constructor

Properties

bodyA

bodyA: b2Body

The first attached body.

bodyB

bodyB: b2Body

The second attached body.

collideConnected

collideConnected: boolean

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

enableLimit

enableLimit: boolean

Enable/disable the joint limit.

enableMotor

enableMotor: boolean

Enable/disable the joint motor.

localAnchorA

localAnchorA: b2Vec2

The local anchor point relative to body1's origin.

localAnchorB

localAnchorB: b2Vec2

The local anchor point relative to body2's origin.

localAxisA

localAxisA: b2Vec2

The local translation axis in bodyA.

lowerTranslation

lowerTranslation: number

The lower translation limit, usually in meters.

maxMotorForce

maxMotorForce: number

The maximum motor torque, usually in N-m.

motorSpeed

motorSpeed: number

The desired motor speed in radians per second.

type

type: number

The joint type is set automatically for concrete joint types.

upperTranslation

upperTranslation: number

The upper translation limit, usually in meters.

userData

userData: any

Use this to attach application specific data to your joints.

Methods

Initialize

  • Initialize the bodies, anchors, and length using the world anchors.

    Parameters

    Returns void

Generated using TypeDoc