Class WheelWVSettingsInterface

Hierarchy (view full)

Properties

angularDamping: number

Angular damping factor of the wheel:

dw/dt = -c * w.

Default Value

0.2
enableSuspensionForcePoint: boolean

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.

Default Value

false
entity: any

PlayCanvas Entity that will be used as a visual wheel. Its position and rotation will be updated automatically to match the physical wheel.

Default Value

null
inertia: number

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.

Default Value

0.9 (kg m^2)
lateralFrictionCurve: any

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.

Default Value

Curve([0, 0, 3, 1.2, 20, 1]);
longitudinalFrictionCurve: any

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.

Default Value

Curve([0, 0, 0.06, 1.2, 0.2, 1])
maxBrakeTorque: number

How much torque the brakes can apply to this wheel.

Default Value

1500 (Nm)
maxHandBrakeTorque: number

How much torque the hand brake can apply to this wheel (usually only applied to the rear wheels).

Default Value

4000 (Nm)
maxSteerAngle: number

How much this wheel can steer.

Default Value

~1.22 rad (70 degrees).
position: any

Attachment point of wheel suspension in local space of the body.

Default Value

Vec3(0, 0, 0)
radius: number

A spring of the wheel.

Default Value

0.3
springSettings: SpringSettings

Wheel spring settings.

Default Value

Frequency spring (frequency: 1.5, damping: 0.5)
steeringAxis: any

Direction of the steering axis in local space of the body, should point up (e.g. for a bike would be -suspensionDirection).

Default Value

Vec3(0, 1, 0)
suspensionDirection: any

Direction of the suspension in local space of the body, should point down.

Default Value

Vec3(0, -1, 0)
suspensionForcePoint: any

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.

Default Value

Vec3(0, 0, 0)
suspensionMaxLength: number

How long the suspension is in max droop position relative to the attachment point.

Default Value

0.5 (m)
suspensionMinLength: number

How long the suspension is in min raised position relative to the attachment point.

Default Value

0.3 (m)
suspensionPreloadLength: number

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.

Default Value

0
wheelForward: any

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).

Default Value

Vec3(0, 0, 1)
wheelUp: any

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).

Default Value

Vec3(0, 1, 0)
width: number

A width of the wheel.

Default Value

0.1