lovr.physics.newSliderJoint
EditCreates a new SliderJoint.
Arguments
Name | Type | Description |
colliderA | Collider |
The first collider to attach the Joint to, or nil to attach the joint to a fixed position in the World.
|
colliderB | Collider | The second collider to attach the Joint to. |
ax | number | The x component of the slider axis. |
ay | number | The y component of the slider axis. |
az | number | The z component of the slider axis. |
Returns
Name | Type | Description |
slider | SliderJoint | The new SliderJoint. |
Arguments
Name | Type | Description |
colliderA | Collider |
The first collider to attach the Joint to, or nil to attach the joint to a fixed position in the World.
|
colliderB | Collider | The second collider to attach the Joint to. |
axis | Vec3 | The slider axis direction. |
Returns
Name | Type | Description |
slider | SliderJoint | The new SliderJoint. |
Notes
A slider joint constrains two colliders to only allow movement along the slider's axis.