×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2483 | Released: 31 Oct 2014, 1:37am | What's New | Download Now

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