×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2014.2379 | Released: 24 Jul 2014, 5:28pm | What's New | Download Now

joint:setRotationLimits()

Description:

Sets upper and lower rotation limits on the joint in degrees.

For use with Pivot joints.

Syntax:

joint:setRotationLimits( lowerLimit, upperLimit )

Example:

myJoint = physics.newJoint( "pivot", crateA, crateB, 200,300 )
myJoint.isLimitEnabled = true 
myJoint:setRotationLimits( -45, 45 )

Parameters:

lowerLimit
The lower rotation limit in degrees from zero (0).
upperLimit
The upper rotation limit in degrees from zero (0).

Returns:

Nothing.

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