lovr.physics.newHingeJoint
Creates a new HingeJoint.
hinge = lovr.physics.newHingeJoint(colliderA, colliderB, x, y, z, ax, ay, az)
Arguments
Name | Type | Description |
colliderA | Collider | The first collider to attach the Joint to. |
colliderB | Collider | The second collider to attach the Joint to. |
x | number | The x position of the hinge anchor, in world coordinates. |
y | number | The y position of the hinge anchor, in world coordinates. |
z | number | The z position of the hinge anchor, in world coordinates. |
ax | number | The x component of the hinge axis. |
ay | number | The y component of the hinge axis. |
az | number | The z component of the hinge axis. |
Returns
Name | Type | Description |
hinge | HingeJoint | The new HingeJoint. |
Notes
A hinge joint constrains two colliders to allow rotation only around the hinge's axis.
See also
lovr.physics.newBallJoint
lovr.physics.newDistanceJoint
lovr.physics.newSliderJoint
lovr.physics