Class VehicleControlAuthoring
Authoring component for vehicle control
Inherited Members
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 |