19.10.7 Ratchet Joint

joint = physics.RatchetJoint(a, b, phase, ratchet)

Parameter

Type

Description

a

in physics.Body

First Body

b

in physics.Body

Second Body

phase

in number

Initial offset in radians

ratchet

in number

The distance in radians between clicks of the ratchet

joint

out physics.RatchetJoint

New RatchetJoint

Works like a socket wrench. ratchet is the distance between clicks, phase is the initial offset to use when deciding where the ratchet angles are.

Accessors

Type

setAngle, angle

number

setphase, phase

number

setRatchet, ratchet

number

Introduced in platform.apiLevel = '2.0'