docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class VehicleControlAuthoring

    Authoring component for vehicle control

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    VehicleControlAuthoring
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Vehicles
    Assembly: com.unity.vehicles.dll
    Syntax
    [RequireComponent(typeof(VehicleAuthoring))]
    [DisallowMultipleComponent]
    public class VehicleControlAuthoring : MonoBehaviour

    Fields

    AeroDownforceCoefficient

    Aerodynamic downforce coefficient (Cl).

    Declaration
    [Tooltip("Aerodynamic downforce coefficient (Cl).")]
    public float AeroDownforceCoefficient
    Field Value
    Type Description
    float

    AeroDownforceOffset

    Aero downforce application point offset from the vehicle center of mass.

    Declaration
    [Tooltip("Aero downforce application point offset from the vehicle center of mass.")]
    public float3 AeroDownforceOffset
    Field Value
    Type Description
    float3

    AeroDragCoefficient

    Aerodyamic drag coefficient (Cd).

    Declaration
    [Header("Aerodynamics")]
    [Tooltip("Aerodyamic drag coefficient (Cd).")]
    public float AeroDragCoefficient
    Field Value
    Type Description
    float

    AeroDragOffset

    Aero force application point offset from the vehicle center of mass.

    Declaration
    [Tooltip("Aero force application point offset from the vehicle center of mass.")]
    public float3 AeroDragOffset
    Field Value
    Type Description
    float3

    EngineAngularInertia

    Angular inertia of the engine. Higher value will result in an engine that takes longer time to spin up/down.

    Declaration
    [Tooltip("Angular inertia of the engine. Higher value will result in an engine that takes longer time to spin up/down.")]
    public float EngineAngularInertia
    Field Value
    Type Description
    float

    EngineAngularVelocityCalculation

    Determines how the engine angular velocity is calculated from the wheel angular velocities. Maximum is recommended for vehicles with different wheel sizes. Minimum - only the slowest spinning driven wheel is taken into the account. Average - average of all the driven wheels. Maximum - only the fastest spinning driven wheel is taken into the account.

    Declaration
    [Tooltip("Determines how the engine angular velocity is calculated from the wheel angular velocities. Maximum is recommended for vehicles with different wheel sizes. Minimum - only the slowest spinning driven wheel is taken into the account. Average - average of all the driven wheels. Maximum - only the fastest spinning driven wheel is taken into the account.")]
    public VehicleControlAuthoring.EngineAngularVelocityCalculationType EngineAngularVelocityCalculation
    Field Value
    Type Description
    VehicleControlAuthoring.EngineAngularVelocityCalculationType

    EngineBrakingIntensity

    The amount of negative torque created by the engine due to the losses, expressed as a percentage of the maximum engine torque. Engine braking is only applied when there is not throttle input.

    Declaration
    [Tooltip("The amount of negative torque created by the engine due to the losses, expressed as a percentage of the maximum engine torque. Engine braking is only applied when there is not throttle input.")]
    public float EngineBrakingIntensity
    Field Value
    Type Description
    float

    EngineIdleRPM

    Engine RPM at idle.

    Declaration
    [Tooltip("Engine RPM at idle.")]
    public float EngineIdleRPM
    Field Value
    Type Description
    float

    EngineMaxRPM

    Maximum engine RPM at which it can generate torque.

    Declaration
    [Header("Engine")]
    [Tooltip("Maximum engine RPM at which it can generate torque.")]
    public float EngineMaxRPM
    Field Value
    Type Description
    float

    EngineMaxTorque

    Maximum torque the engine can produce. The final torque value also depends on the EngineTorqueCurve.

    Declaration
    [Tooltip("Maximum torque the engine can produce. The final torque value also depends on the EngineTorqueCurve.")]
    public float EngineMaxTorque
    Field Value
    Type Description
    float

    EngineStartOnAwake

    Should the engine be automatically started on vehicle awake?

    Declaration
    [Tooltip("Should the engine be automatically started on vehicle awake?")]
    public bool EngineStartOnAwake
    Field Value
    Type Description
    bool

    EngineStartOnThrottle

    Should the engine be automatically started on throttle input?

    Declaration
    [Tooltip("Should the engine be automatically started on throttle input?")]
    public bool EngineStartOnThrottle
    Field Value
    Type Description
    bool

    EngineTorqueCurve

    Normalized torque curve representing engine angular velocity on the X axis and the torque on the Y axis.

    Declaration
    [Tooltip("Normalized torque curve representing engine angular velocity on the X axis and the torque on the Y axis. ")]
    public SampledAnimationCurve EngineTorqueCurve
    Field Value
    Type Description
    SampledAnimationCurve

    MaxBrakeTorque

    Maximum brake torque that can be applied to a wheel. Final wheel brake torque also depends on the brake coefficient for that wheel.

    Declaration
    [Tooltip("Maximum brake torque that can be applied to a wheel. Final wheel brake torque also depends on the brake coefficient for that wheel.")]
    public float MaxBrakeTorque
    Field Value
    Type Description
    float

    SteerSpeed

    The speed of change of the steering angle.

    Declaration
    [Tooltip("The speed of change of the steering angle.")]
    public float SteerSpeed
    Field Value
    Type Description
    float

    SteeringSensitivityHighSpeed

    The percentage of steering input at high speeds (SteeringSensitivitySpeedReference).

    Declaration
    [Tooltip("The percentage of steering input at high speeds.")]
    public float SteeringSensitivityHighSpeed
    Field Value
    Type Description
    float

    SteeringSensitivityLowSpeed

    The percentage of steering input at low speeds.

    Declaration
    [Tooltip("The percentage of steering input at low speeds.")]
    public float SteeringSensitivityLowSpeed
    Field Value
    Type Description
    float

    SteeringSensitivitySpeedReference

    The speed at which the SteeringSensitivityHighSpeed is in full effect. The steering sensitivity is lerped between the SteeringSensitivityLowSpeed and SteeringSensitivityHighSpeed from 0 to this value.

    Declaration
    [Tooltip("The speed at which the SteeringSensitivityHighSpeed is in full effect.The steering sensitivity is lerped between the SteeringSensitivityLowSpeedand SteeringSensitivityHighSpeed from 0 to this value.")]
    public float SteeringSensitivitySpeedReference
    Field Value
    Type Description
    float

    SwapThrottleAndBrakeInReverse

    Should the throttle and brake input be swapped when going in reverse? Usually true with the automatic transmission.

    Declaration
    [Header("Control")]
    [Tooltip("Should the throttle and brake input be swapped when going in reverse? Usually true with the automatic transmission.")]
    public bool SwapThrottleAndBrakeInReverse
    Field Value
    Type Description
    bool

    TransmissionFinalGearRatio

    A multiplier by which the forward/reverse gear ratios are multiplied. Commonly also called differential (diff) gear ratio.

    Declaration
    [Tooltip("A multiplier by which the forward/reverse gear ratios are multiplied. Commonly also called differential (diff) gear ratio.")]
    public float TransmissionFinalGearRatio
    Field Value
    Type Description
    float

    TransmissionForwardGearRatios

    List of the gear ratios for forward gears. The list starts with the 1st gear (D1). The values should be in a descending order since the higher the gear, the lower the gear ratio.

    Declaration
    [Tooltip("List of the gear ratios for forward gears.  The list starts with the 1st gear (D1). The values should be in a descending order since the higher the gear, the lower the gear ratio.")]
    public List<float> TransmissionForwardGearRatios
    Field Value
    Type Description
    List<float>

    TransmissionIsAutomatic

    Is the transmission automatic? Automatic transmission requires no user input for changing gears.

    Declaration
    [Header("Transmission")]
    [Tooltip("Is the transmission automatic? Automatic transmission requires no user input for changing gears.")]
    public bool TransmissionIsAutomatic
    Field Value
    Type Description
    bool

    TransmissionReverseGearRatios

    List of the gear ratios for the reverse gears. The list starts with the 1st reverse gear (R1). The values should be in a descending order.

    Declaration
    [Tooltip("List of the gear ratios for the reverse gears. The list starts with the 1st reverse gear (R1). The values should be in a descending order.")]
    public List<float> TransmissionReverseGearRatios
    Field Value
    Type Description
    List<float>

    TransmissionShiftDownRPM

    The RPM at which the automatic transmission will shift into a lower gear.

    Declaration
    [Tooltip("The RPM at which the automatic transmission will shift into a lower gear.")]
    public float TransmissionShiftDownRPM
    Field Value
    Type Description
    float

    TransmissionShiftUpRPM

    The RPM at which the automatic transmission will shift into a higher gear.

    Declaration
    [Tooltip("The RPM at which the automatic transmission will shift into a higher gear.")]
    public float TransmissionShiftUpRPM
    Field Value
    Type Description
    float

    WheelAngularVelocityLimit

    Wheel speed limiter, with braking applied once the set speed is exceeded. Set to lesser or equal to 0 to deactivate.

    Declaration
    [Tooltip("Wheel speed limiter, with braking applied once the set speed is exceeded. Set to lesser or equal to 0 to deactivate.")]
    public float WheelAngularVelocityLimit
    Field Value
    Type Description
    float
    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)