DistanceJoint

Edit

A DistanceJoint is a type of Joint that tries to keep two colliders within a certain distance. The distance is determined by the initial distance between the anchor points. The joint allows for rotation on the anchor points.

Constructor

lovr.physics.newDistanceJointCreate a new DistanceJoint.

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.
DistanceJoint:getLimitsGet the minimum and maximum distance.
DistanceJoint:getSpringGet the spring parameters of the joint.
DistanceJoint:setLimitsSet the minimum and maximum distance.
DistanceJoint:setSpringSet the spring parameters of the joint.

See also