A slider joint constrains the motion of two sprites to sliding along a common axis, without rotation.
Also known as a prismatic joint.
The Box2D joint ID. Don't change it!
The first sprite in the joint.
The second sprite in the joint.
The type of joint. Can be one of:
"glue", "distance", "wheel", "hinge", "slider", or "grabber".
Can't be changed after the joint is created.
Determines whether to draw the joint if spriteA or spriteB is drawn.
Function that draws the joint. Can be overridden by the user.
The current sliding speed of the joint.
The mathematical lower limit of translation.
The current motor force being applied.
Accepts a number to set a symmetric range or an array with the lower and upper translation limits.
How much force the joint is applying to keep the two sprites together.
How much torque the joint is applying to keep the two sprites together.
The current displacement of spriteB along the slide axis.
The mathematical upper limit of translation.
Deletes the joint from the world and from each of the associated sprites' joints arrays.
This function is run when the joint's reaction force exceeds the force threshold or its reaction torque exceeds the torque threshold.
By default, the sprites' speed and rotation speed are set to 0 and the joint is deleted, simulating a break.
A Joint is used to constrain the movement of two sprites relative to each other, which can lead to nuanced physics interactions.