SliderJoint

Edit

A SliderJoint is a type of Joint that only allows colliders to move on a single axis.

Constructor

lovr.physics.newSliderJointCreate a new SliderJoint.

Methods

Joint:destroyDestroy the Joint.
Joint:getAnchorsGet the anchor points of the Joint.
Joint:getCollidersGet the Colliders the Joint is attached to.
Joint:getForceGet the force used to satisfy the Joint's constraint.
Joint:getPriorityGet the priority of the Joint.
Joint:getTorqueGet the torque used to satisfy the Joint's constraint.
Joint:getTypeGet the type of the Joint.
Joint:getUserDataGet the Lua value associated with the Joint.
Joint:isDestroyedCheck if a Joint is destroyed.
Joint:isEnabledCheck if the Joint is enabled.
Joint:setEnabledEnable or disable the Joint.
Joint:setPrioritySet the priority of the Joint.
Joint:setUserDataAssociate a Lua value with the Joint.
SliderJoint:getAxisGet the axis of the SliderJoint.
SliderJoint:getFrictionGet the friction of the SliderJoint.
SliderJoint:getLimitsGet the position limits of the SliderJoint.
SliderJoint:getMaxMotorForceGet the maximum amount of force the motor can use.
SliderJoint:getMotorForceGet the current motor force.
SliderJoint:getMotorModeGet the motor mode of the SliderJoint.
SliderJoint:getMotorSpringGet the spring parameters of the motor target.
SliderJoint:getMotorTargetGet the target of the slider motor.
SliderJoint:getPositionGet how far the SliderJoint is extended.
SliderJoint:getSpringGet the spring parameters of the SliderJoint limits.
SliderJoint:setFrictionSet the friction of the SliderJoint.
SliderJoint:setLimitsSet the position limits of the SliderJoint.
SliderJoint:setMaxMotorForceSet the maximum amount of force the motor can use.
SliderJoint:setMotorModeSet the motor mode of the SliderJoint.
SliderJoint:setMotorSpringSet the spring parameters of the motor target.
SliderJoint:setMotorTargetSet the target of the slider motor.
SliderJoint:setSpringSet the spring parameters of the SliderJoint limits.

See also