CoronaSDK 2013.1144 | Released: 19 Jun 2013, 10:41am | What's New | Download Now
These docs are *very* out of date.
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
joint.ratio
Description:
The “ratio” property is used to optionally simulate a block and tackle arrangement, in which one side of the rope moves faster than the other. By default, this ratio is 1.0, which simulates a simple pulley.
This is used with the Pulley joint.
Syntax:
value = joint.ratio
Example:
myJoint = physics.newJoint( "pulley", crateA, crateB, anchorA_x,anchorA_y, anchorB_x,anchorB_y, crateA.x,crateA.y, crateB.x,crateB.y, 1.0 ) length1 = myJoint.length1 -- (get-only; value in pixels) length2 = myJoint.length2 -- (get-only; value in pixels) ratio = myJoint.ratio -- (get-only)
Parameters:
None.
Returns:
value
The pulley ratio. Default is 1.0.
Remarks:
Supported on operating systems and platforms for build numbers shown:
- Mac OS X:Build 2010.222
- Windows:Build 2010.222
- iOS:Build 2010.222
- Android:Build 2010.222