object.length2

Type Number
Object Joint
Library physics.*
Revision Release 2022.3683
Keywords joint, length2
See also object.length1
Physics Joints (guide)

Overview

Read-only value that, upon instantiation of a "pulley" joint, indicates the distance in pixels between the second anchor point and its stationary pulley anchor point.

Example

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 )