WeldJoint

Edit

A 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.newWeldJointCreate a new WeldJoint.

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.

See also