lovr.physics.newBallJoint
Creates a new BallJoint.
ball = lovr.physics.newBallJoint(colliderA, colliderB, x, y, z)
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 joint anchor point, in world coordinates. |
y | number | The y position of the joint anchor point, in world coordinates. |
z | number | The z position of the joint anchor point, in world coordinates. |
Returns
Name | Type | Description |
ball | BallJoint | The new BallJoint. |
Notes
A ball joint is like a ball and socket between the two colliders. It tries to keep the distance between the colliders and the anchor position the same, but does not constrain the angle between them.
See also
lovr.physics.newDistanceJoint
lovr.physics.newHingeJoint
lovr.physics.newSliderJoint
lovr.physics