API Documentation for:
Show:

b2RopeJointDef Class

Extends B2JointDef
Defined in: b2RopeJointDef:19
Module: Joints

Rope joint definition. This requires two body anchor points and a maximum lengths.

Note: by default the connected objects will not collide. see collideConnected in b2JointDef.

Constructor

b2RopeJointDef

()

Defined in b2RopeJointDef:19

Methods

initialize

(
  • bodyA
  • bodyB
  • anchorA
  • anchorB
)
Void public

Defined in initialize:163

Parameters:

  • bodyA B2Body
  • bodyB B2Body
  • anchorA B2Vec2
  • anchorB B2Vec2

Returns:

Void:

Properties

bodyA

B2Body | Null public

Defined in bodyA:76

Default: null

bodyB

B2Body | Null public

Defined in bodyB:85

Default: null

localAnchorA

B2Vec2 public

Defined in localAnchorA:54

The local anchor point relative to bodyA's origin.

Default: (-1, 0)

localAnchorB

B2Vec2 public

Defined in localAnchorB:64

The local anchor point relative to bodyB's origin.

Default: (1, 0)

maxLength

Number public

Defined in maxLength:121

The maximum length of the rope.

Warning: this must be larger than b2Settings.b2_linearSlop or the joint will have no effect.

Default: 0.0

type

Int public

Defined in type:94

Default: {b2RopeJoint} b2RopeJoint