Constructor
new Box2dJoint(jointDef)
Create a box2d joint, the base class is not intended to be used directly
| Name | Type | Description |
|---|---|---|
jointDef | Object | Freed once the joint is made, Box2D copies it |
- Source
Members
box2dJoint
Properties| Type | Description |
|---|---|
| Object | The Box2d joint, 0 once it is destroyed, as it is when either object is |
- Source
Methods
destroy()
Destroy this joint
- Source
getAnchorA() → {Vector2}
Get the first anchor for this joint in world coordinates
- Source
- Type:
- Vector2
getAnchorB() → {Vector2}
Get the second anchor for this joint in world coordinates
- Source
- Type:
- Vector2
getCollideConnected() → {boolean}
Check if the connected bodies should collide
- Source
- Type:
- boolean
getObjectA() → {Box2dObject}
Get the first object attached to this joint
- Source
- Type:
- Box2dObject
getObjectB() → {Box2dObject}
Get the second object attached to this joint
- Source
- Type:
- Box2dObject
getReactionForce(timeopt) → {Vector2}
Get the reaction force on bodyB at the joint anchor over the last step
| Name | Type | Attributes | Description |
|---|---|---|---|
time | number | <optional> | The step length in seconds, the world steps by timeDelta |
- Source
- Type:
- Vector2
getReactionTorque(timeopt) → {number}
Get the reaction torque on bodyB in N*m over the last step, clockwise like angle
| Name | Type | Attributes | Description |
|---|---|---|---|
time | number | <optional> | The step length in seconds, the world steps by timeDelta |
- Source
- Type:
- number
isActive() → {boolean}
Check if either connected body is active
- Source
- Type:
- boolean
isDestroyed() → {boolean}
Check if the joint is gone, destroyed or taken along with one of its objects; its other methods can not be used then
- Source
- Type:
- boolean