WeldJoint
EditA WeldJoint is a Joint that restricts all relative motion between two colliders, as though they were welded together into a single object. All six degrees of freedom are constrained.
WeldJoints are useful for making breakable objects. Several colliders can be welded together with joints, and if Joint:getForce reports a large enough value, the joints can be disabled or destroyed, allowing the pieces to move freely.
Constructor
| lovr.physics.newWeldJoint | Create a new WeldJoint. |
Methods
| 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. |