DistanceJoint
EditA 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.newDistanceJoint | Create a new DistanceJoint. |
Methods
| DistanceJoint:getLimits | Get the minimum and maximum distance. |
| DistanceJoint:getSpring | Get the spring parameters of the joint. |
| DistanceJoint:setLimits | Set the minimum and maximum distance. |
| DistanceJoint:setSpring | Set the spring parameters of the joint. |
| Joint:destroy | Destroy the Joint. |
| Joint:getAnchors | Get the anchor points of the Joint. |
| Joint:getColliders | Get the Colliders the Joint is attached to. |
| Joint:getForce | Get the force used to satisfy the Joint's constraint. |
| Joint:getPriority | Get the priority of the Joint. |
| Joint:getTorque | Get the torque used to satisfy the Joint's constraint. |
| Joint:getType | Get the type of the Joint. |
| Joint:getUserData | Get the Lua value associated with the Joint. |
| Joint:isDestroyed | Check if a Joint is destroyed. |
| Joint:isEnabled | Check if the Joint is enabled. |
| Joint:setEnabled | Enable or disable the Joint. |
| Joint:setPriority | Set the priority of the Joint. |
| Joint:setUserData | Associate a Lua value with the Joint. |