Constructor
new Box2dPulleyJoint(objectA, objectB, groundAnchorA, groundAnchorB, anchorA, anchorB, ratioopt, collideopt)
Create a pulley joint
Parameters:
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
- Box2dJoint
Methods
getCurrentLengthA() → {number}
Get the current length of the segment attached to objectA
- Source
Returns:
- Type:
- number
getCurrentLengthB() → {number}
Get the current length of the segment attached to objectB
- Source
Returns:
- Type:
- number
getGroundAnchorA() → {Vector2}
Get the first ground anchor
- Source
Returns:
- Type:
- Vector2
getGroundAnchorB() → {Vector2}
Get the second ground anchor
- Source
Returns:
- Type:
- Vector2
getLengthA() → {number}
Get the current length of the segment attached to objectA
- Source
Returns:
- Type:
- number
getLengthB() → {number}
Get the current length of the segment attached to objectB
- Source
Returns:
- Type:
- number
getRatio() → {number}
Get the pulley ratio
- Source
Returns:
- Type:
- number