Type Number Object Joint Library physics.* Revision 2018.3381 Keywords joint, ratio See also object.joint1 object.joint2 Physics Joints (guide)
Applies only to
"pulley" joint, indicates the current joint ratio. For this joint type, this property is
1.0 which simulates a simple pulley.
"gear" joint, this property can be either set or read, and it indicates the ratio at which the
local pulleyJoint = physics.newJoint( "pulley", bodyA, bodyB, anchorA_x, anchorA_y, anchorB_x, anchorB_y, bodyA.x, bodyA.y, bodyB.x, bodyB.y, 1.0 ) print( pulleyJoint.length1 ) print( pulleyJoint.length2 ) print( pulleyJoint.ratio )
local gearJoint = physics.newJoint( "gear", bodyA, bodyB, joint1, joint2, 1.0 ) print( gearJoint.ratio ) -- Change gear joint ratio gearJoint.ratio = 0.4