Constructor
new Box2dMotorJoint(objectA, objectB)
Create a motor joint
Parameters:
Name | Type | Description |
---|---|---|
objectA | Box2dObject | |
objectB | Box2dObject |
- Source
Extends
- Box2dJoint
Methods
getAngularOffset() → {number}
Get the target angular offset
- Source
Returns:
- Type:
- number
getCorrectionFactor() → {number}
Get the position correction factor in the range [0,1]
- Source
Returns:
- Type:
- number
getLinearOffset() → {Vector2}
Get the target linear offset, in frame A, in meters.
- Source
Returns:
- Type:
- Vector2
getMaxForce() → {number}
Get the maximum friction force
- Source
Returns:
- Type:
- number
getMaxTorque() → {number}
Get the maximum torque
- Source
Returns:
- Type:
- number
setAngularOffset(offset)
Set the target angular offset
Parameters:
Name | Type | Description |
---|---|---|
offset | number |
- Source
setCorrectionFactor(factor)
Set the position correction factor in the range [0,1]
Parameters:
Name | Type | Description |
---|---|---|
factor | number |
- Source
setLinearOffset(offset)
Set the target linear offset, in frame A, in meters.
Parameters:
Name | Type | Description |
---|---|---|
offset | Vector2 |
- Source
setMaxForce(force)
Set the maximum friction force
Parameters:
Name | Type | Description |
---|---|---|
force | number |
- Source
setMaxTorque(torque)
Set the maximum torque
Parameters:
Name | Type | Description |
---|---|---|
torque | number |
- Source