docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct WheelOnVehicle

    Holds dynamic/calcualted wheel data. For wheel settings refer to Wheel.

    Implements
    IBufferElementData
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Vehicles
    Assembly: com.unity.vehicles.dll
    Syntax
    [InternalBufferCapacity(4)]
    public struct WheelOnVehicle : IBufferElementData

    Fields

    AngularVelocity

    Current angular velocity of the wheel in radians per second.

    Declaration
    public float AngularVelocity
    Field Value
    Type Description
    float

    AngularVelocityLimit

    Maximum angular velocity the wheel can achieve.

    Declaration
    public float AngularVelocityLimit
    Field Value
    Type Description
    float

    AxlePairedWheelEntity

    Wheel entity that shares the same axle as this wheel.

    Declaration
    public Entity AxlePairedWheelEntity
    Field Value
    Type Description
    Entity

    AxlePairedWheelIndex

    Index of the wheel entity that shares the same axle as this wheel.

    Declaration
    public int AxlePairedWheelIndex
    Field Value
    Type Description
    int

    BrakeTorque

    Current brake torque of the wheel, expressed in Nm. The value can only be positive, and any value >0 will block motor torque from being applied.

    Declaration
    public float BrakeTorque
    Field Value
    Type Description
    float

    DisableStaticFrictionSingleFrame

    Static friction is disabled for one frame when true. Allows the vehicle to get out of the static friction lock.

    Declaration
    public bool DisableStaticFrictionSingleFrame
    Field Value
    Type Description
    bool

    Entity

    The wheel entity

    Declaration
    public Entity Entity
    Field Value
    Type Description
    Entity

    FrictionImpulse

    Total friction impulse for the global physics step.

    Declaration
    public float3 FrictionImpulse
    Field Value
    Type Description
    float3

    FrictionSlip

    Friction slip values. X represents the longitudinal slip, Y represents the lateral slip. Both values are normalized. Lateral slip value of 1 equals 90 degree lateral slip angle, while the longitudinal slip value represents slip ratio of 1.

    Declaration
    public float2 FrictionSlip
    Field Value
    Type Description
    float2

    FrictionSpeed

    Friction speed values. X represents the longitudinal speed, Y represents the lateral speed. Expressed in m/s. Both values are in world space. To get the effective speeds for moving platforms, objects, etc. subtract the HitRigidbodyVelocity from this value.

    Declaration
    public float2 FrictionSpeed
    Field Value
    Type Description
    float2

    IsGrounded

    Is the wheel touching the ground?

    Declaration
    public bool IsGrounded
    Field Value
    Type Description
    bool

    MotorTorque

    Current motor torque of the wheel, expressed in Nm.

    Declaration
    public float MotorTorque
    Field Value
    Type Description
    float

    RotationAngle

    Rotation angle of the wheel, relative to the axle. The value is clamped to one full rotation and can be used to position the wheel visual.

    Declaration
    public float RotationAngle
    Field Value
    Type Description
    float

    StaticFrictionRefPosition

    Position of the anti-creep reference. The wheel will attempt to hold this position when stationary.

    Declaration
    public float3 StaticFrictionRefPosition
    Field Value
    Type Description
    float3

    StaticFrictionReferenceIsSet

    Is the anti-creep position set? When true, the wheel will attempt to hold a fixed position to prevent creep on slopes.

    Declaration
    public bool StaticFrictionReferenceIsSet
    Field Value
    Type Description
    bool

    SteerAngle

    Current steer angle of the wheel in degrees.

    Declaration
    public float SteerAngle
    Field Value
    Type Description
    float

    SuspensionImpulse

    Total suspension impulse for the global physics step.

    Declaration
    public float3 SuspensionImpulse
    Field Value
    Type Description
    float3

    SuspensionLength

    Current length of the suspension, expressed in meters.

    Declaration
    public float SuspensionLength
    Field Value
    Type Description
    float

    SuspensionLocalTransform

    Local transform of the wheel suspension. This transform represents the origin and direction of the suspension travel.

    Declaration
    public RigidTransform SuspensionLocalTransform
    Field Value
    Type Description
    RigidTransform

    VisualSuspensionLength

    Smoothed suspension length for wheel meshes, expressed in meters.

    Declaration
    public float VisualSuspensionLength
    Field Value
    Type Description
    float

    Wheel

    Wheel that belongs to this VehicleWheel buffer.

    Declaration
    public Wheel Wheel
    Field Value
    Type Description
    Wheel

    WheelHit

    Data from the collider cast.

    Declaration
    public ColliderCastHit WheelHit
    Field Value
    Type Description
    ColliderCastHit

    WheelProtectorChildColliderIndex

    Index of the wheel protector child collider in the vehicle compound collider.

    Declaration
    public int WheelProtectorChildColliderIndex
    Field Value
    Type Description
    int

    Implements

    IBufferElementData
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)