You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > Pin Joint

19.10.5 Pin Joint

joint = physics.PinJoint(a, b, anchr1, anchr2)

Parameter

Type

Description

a

in physics.Body

First Body

b

in physics.Body

Second Body

anchr1

in physics.Vect

The anchor point on Body a

anchr2

in physics.Vect

The anchor point on Body b

joint

out physics.PinJoint

New PinJoint

a and b are the two bodies to connect, and anchr1 and anchr2 are the anchor points on those bodies. The distance between the two anchor points is measured when the joint is created. If you want to set a specific distance, use the setter function to override it.

Accessors

Type

setAnchr1, anchr1

physics.Vect

setAnchr2, anchr2

physics.Vect

setDist, dist

number

Introduced in platform.apiLevel = '2.0'