Box2D. Box2dWeldJoint

Box2D Weld Joint

  • Glues two objects together

Constructor

new Box2dWeldJoint(objectA, objectB, anchor, collideopt)

Create a weld joint

Parameters:
NameTypeAttributesDefaultDescription
objectABox2dObject
objectBBox2dObject
anchorVector2
collideboolean<optional>
false

Extends

  • Box2dJoint

Methods

getFrequency() → {number}

Get the frequency in Hertz

Returns:
Type: 
number

getLocalAnchorA() → {Vector2}

Get the local anchor point relative to objectA's origin

Returns:
Type: 
Vector2

getLocalAnchorB() → {Vector2}

Get the local anchor point relative to objectB's origin

Returns:
Type: 
Vector2

getReferenceAngle() → {number}

Get the reference angle

Returns:
Type: 
number

getSpringDampingRatio() → {number}

Get the damping ratio

Returns:
Type: 
number

setFrequency(hz)

Set the frequency in Hertz

Parameters:
NameTypeDescription
hznumber

setSpringDampingRatio(ratio)

Set the damping ratio

Parameters:
NameTypeDescription
rationumber