Class WheelSettingsInterface

Hierarchy (view full)

Properties

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