Wheel joints can be used to create vehicles!
By default motorEnabled is false, angle is 90 degrees,
maxPower is 1000, springiness is 0.1, and damping is 0.7.
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 minimum distance the wheel's suspension can contract from 0, which represents the resting position, when limits are enabled.
Maximum torque the motor can apply.
The current torque being applied by the motor.
The distance the wheel's suspension can contract or extend from 0, which represents the resting position.
Accepts a number to set a symmetric range or an array with the minimum and maximum length 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 maximum distance the wheel's suspension can extend from 0, which represents the resting position, when limits are enabled.
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.