Constructor
new Box2dJoint(jointDef)
Create a box2d joint, the base class is not intended to be used directly
Parameters:
Name | Type | Description |
---|---|---|
jointDef | Object |
- Source
Methods
destroy()
Destroy this joint
- Source
getAnchorA() → {Vector2}
Get the first anchor for this joint in world coordinates
- Source
Returns:
- Type:
- Vector2
getAnchorB() → {Vector2}
Get the second anchor for this joint in world coordinates
- Source
Returns:
- Type:
- Vector2
getCollideConnected() → {boolean}
Check if the connected bodies should collide
- Source
Returns:
- Type:
- boolean
getObjectA() → {Box2dObject}
Get the first object attached to this joint
- Source
Returns:
- Type:
- Box2dObject
getObjectB() → {Box2dObject}
Get the second object attached to this joint
- Source
Returns:
- Type:
- Box2dObject
getReactionForce(time) → {Vector2}
Get the reaction force on bodyB at the joint anchor given a time step
Parameters:
Name | Type | Description |
---|---|---|
time | number |
- Source
Returns:
- Type:
- Vector2
getReactionTorque(time) → {number}
Get the reaction torque on bodyB in N*m given a time step
Parameters:
Name | Type | Description |
---|---|---|
time | number |
- Source
Returns:
- Type:
- number
isActive() → {boolean}
Check if either connected body is active
- Source
Returns:
- Type:
- boolean