lovr.physics.newSliderJoint

Creates a new SliderJoint.

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

Arguments

NameTypeDescription
colliderAColliderThe first collider to attach the Joint to.
colliderBColliderThe second collider to attach the Joint to.
axnumberThe x component of the slider axis.
aynumberThe y component of the slider axis.
aznumberThe z component of the slider axis.

Returns

NameTypeDescription
sliderSliderJointThe new SliderJoint.

Notes

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

See also