Constructor
new Box2dPulleyJoint(objectA, objectB, groundAnchorA, groundAnchorB, anchorA, anchorB, ratioopt, collideopt)
Create a pulley joint
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
objectA | Box2dObject | |||
objectB | Box2dObject | |||
groundAnchorA | Vector2 | |||
groundAnchorB | Vector2 | |||
anchorA | Vector2 | |||
anchorB | Vector2 | |||
ratio | number | <optional> | 1 | |
collide | boolean | <optional> | false |
- Source
Extends
Methods
destroy()
Destroy this joint
- Overrides
- Source
getAnchorA() → {Vector2}
Get the first anchor for this joint in world coordinates
- Overrides
- Source
- Type:
- Vector2
getAnchorB() → {Vector2}
Get the second anchor for this joint in world coordinates
- Overrides
- Source
- Type:
- Vector2
getCollideConnected() → {boolean}
Check if the connected bodies should collide
- Overrides
- Source
- Type:
- boolean
getCurrentLengthA() → {number}
Get the current length of the segment attached to objectA
- Source
- Type:
- number
getCurrentLengthB() → {number}
Get the current length of the segment attached to objectB
- Source
- Type:
- number
getGroundAnchorA() → {Vector2}
Get the first ground anchor
- Source
- Type:
- Vector2
getGroundAnchorB() → {Vector2}
Get the second ground anchor
- Source
- Type:
- Vector2
getLengthA() → {number}
Get the current length of the segment attached to objectA
- Source
- Type:
- number
getLengthB() → {number}
Get the current length of the segment attached to objectB
- Source
- Type:
- number
getObjectA() → {Box2dObject}
Get the first object attached to this joint
- Overrides
- Source
- Type:
- Box2dObject
getObjectB() → {Box2dObject}
Get the second object attached to this joint
- Overrides
- Source
- Type:
- Box2dObject
getRatio() → {number}
Get the pulley ratio
- Source
- Type:
- number
getReactionForce(time) → {Vector2}
Get the reaction force on bodyB at the joint anchor given a time step
Name | Type | Description |
---|---|---|
time | number |
- Overrides
- Source
- Type:
- Vector2
getReactionTorque(time) → {number}
Get the reaction torque on bodyB in N*m given a time step
Name | Type | Description |
---|---|---|
time | number |
- Overrides
- Source
- Type:
- number
isActive() → {boolean}
Check if either connected body is active
- Overrides
- Source
- Type:
- boolean