Interface
Angular damping factor of the wheel:
dw/dt = -c * w.
If disabled, the forces are applied at the collision contact point. This leads to a more accurate simulation when interacting with dynamic objects but makes the vehicle less stable. When setting this to true, all forces will be applied to a fixed point on the vehicle body.
PlayCanvas Entity that will be used as a visual wheel. Its position and rotation will be updated automatically to match the physical wheel.
Moment of inertia. For a cylinder this would be
0.5 * M * R^2
which is 0.9
for a wheel with a mass of 20 kg
and radius 0.3 m
.
Friction in sideway direction of tire as a function of the slip angle (degrees): angle between relative contact velocity and vehicle direction.
If tire forward matches the vehicle direction, then the angle is 0
degrees. If the vehicle
is sliding sideways, e.g. on ice, then the angle is 90 degrees. Example curve keys could be:
[[0, 1], [90, 0.3]]
- full friction at zero degrees, and 0.3
friction at 90
.
Friction in forward direction of tire as a function of the slip ratio (fraction):
(omega_wheel * r_wheel - v_longitudinal) / |v_longitudinal|.
Slip ratio here is a ratio of wheel spinning relative to the floor. At 0
the wheel has
full traction and is rolling perfectly in sync with the ground. At 1 the wheel is locked and
is sliding over the ground.
How much torque the brakes can apply to this wheel.
How much torque the hand brake can apply to this wheel (usually only applied to the rear wheels).
How much this wheel can steer.
Attachment point of wheel suspension in local space of the body.
A spring of the wheel.
Wheel spring settings.
Direction of the steering axis in local space of the body, should point up (e.g. for a bike
would be -suspensionDirection
).
Direction of the suspension in local space of the body, should point down.
Where tire forces (suspension and traction) are applied, in local space of the body. A good default is the center of the wheel in its neutral pose. See enableSuspensionForcePoint.
How long the suspension is in max droop position relative to the attachment point.
How long the suspension is in min raised position relative to the attachment point.
The natural length of the suspension spring is defined as suspensionMaxLength +
suspensionPreloadLength
. Can be used to preload the suspension as the spring is
compressed by suspensionPreloadLength
when the suspension is in max droop position. Note,
that this means when the vehicle touches the ground there is a discontinuity, so it will
also make the vehicle more bouncy as we're updating with discrete time steps.
Forward direction when the wheel is in the neutral steering position (usually
component.forward
but can be used to give the wheel toe, does not need to be perpendicular
to wheelUp).
Up direction when the wheel is in the neutral steering position (usually component.up
but
can be used to give the wheel camber or for a bike would be -suspensionDirection
).
A width of the wheel.