lovr.physics.newSliderJoint

Creates a new SliderJoint.

slider = lovr.physics.newSliderJoint(colliderA, colliderB, ax, ay, az)

Arguments

NameTypeDescription
colliderACollider The first collider to attach the Joint to.
colliderBCollider The second collider to attach the Joint to.
axnumber The x component of the slider axis.
aynumber The y component of the slider axis.
aznumber The z component of the slider axis.

Returns

NameTypeDescription
sliderSliderJoint The new SliderJoint.

Notes

A slider joint constrains two colliders to only allow movement along the slider's axis.

See also