Physics Components
    Preparing search index...

    Class WheelWVSettingsInterface

    Hierarchy (View Summary)

    Index

    Properties

    angularDamping: number

    Angular damping factor of the wheel:

    dw/dt = -c * w.
    
    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.

    false
    
    entity: null | Entity

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

    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.

    0.9 (kg m^2)
    
    lateralFrictionCurve: null | Curve

    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.

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

    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.

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

    How much torque the brakes can apply to this wheel.

    1500 (Nm)
    
    maxHandBrakeTorque: number

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

    4000 (Nm)
    
    maxSteerAngle: number

    How much this wheel can steer.

    ~1.22 rad (70 degrees).
    
    position: Vec3

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

    Vec3(0, 0, 0)
    
    radius: number

    A spring of the wheel.

    0.3
    
    springSettings: SpringSettings

    Wheel spring settings.

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

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

    Vec3(0, 1, 0)
    
    suspensionDirection: Vec3

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

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

    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.

    Vec3(0, 0, 0)
    
    suspensionMaxLength: number

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

    0.5 (m)
    
    suspensionMinLength: number

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

    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.

    0
    
    wheelForward: Vec3

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

    Vec3(0, 0, 1)
    
    wheelUp: Vec3

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

    Vec3(0, 1, 0)
    
    width: number

    A width of the wheel.

    0.1