Vehicle Assets
The VehicleAsset class is used by vehicles. These can be driven by players, have support for gun turrets, can function as a storage container for items, and more.
Game Data File
The GUID
and Type
properties are required by all vehicle assets. Many vehicle assets will want to include Engine
and Rarity
as well. The ID
property used to be required, but this is no longer necessary.
Any properties from parent classes that are required—or recommended—are listed in the table below.
Class |
Property Name |
Required Value |
---|---|---|
|
||
Properties
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
deprecated |
||
|
||
|
||
|
||
|
||
|
||
|
||
See description |
||
|
||
deprecated |
||
|
||
|
||
deprecated |
||
|
||
|
||
|
||
Property Name |
Type |
Default Value |
---|---|---|
See description |
||
See description |
||
|
||
|
||
|
||
|
||
|
||
See description |
||
|
||
|
||
|
||
|
||
|
||
See description |
||
|
||
|
||
|
||
|
||
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Name |
Type |
Default Value |
---|---|---|
|
||
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Property Name |
Type |
Default Value |
---|---|---|
|
||
See description |
||
|
||
|
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Name |
Type |
Default Value |
---|---|---|
Property Name |
Type |
Default Value |
---|---|---|
See description |
||
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
See description |
||
See description |
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
Property Name |
Type |
Default Value |
---|---|---|
See description |
||
|
EEngine Enumeration
Named Value |
Description |
---|---|
|
This vehicle is part of the Car category. |
|
This vehicle is part of the Plane category. |
|
This vehicle is part of the Blimp category. |
|
This vehicle is part of the Boat category. |
|
This vehicle is part of the Train category. |
EVehicleBuildablePlacementRule Enumeration
Named Value |
Description |
---|---|
|
Vehicle does not override placement. This means that barricades can be attached unless the barricade sets Allow_Placement_On_Vehicle to |
|
Vehicle allows any barricade to be placed on it, regardless of the barricade’s Allow_Placement_On_Vehicle setting. Trains used to use this option, but it can be exploited to move beds into out-of-bounds areas (e.g., into other objects). |
|
Vehicle prevents any barricade form being placed on it. |
EVehicleDefaultPaintColorMode
Named Value |
Description |
---|---|
|
Not configured. |
|
Pick from the DefaultPaintColors list. |
|
Pick a random HSV using DefaultPaintColor_Configuration. |
EVehicleEngineSoundType Enumeration
Named Value |
Description |
---|---|
|
Default. |
|
Set pitch and volume of a single clip according to engine RPM. |
PaintableVehicleSection Dictionary
Property Name |
Type |
Default Value |
---|---|---|
|
RpmEngineSoundConfiguration Dictionary
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
VehicleRandomPaintColorConfiguration Dictionary
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
VehicleWheelConfiguration Dictionary
Property Name |
Type |
Default Value |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
Property Descriptions
AdditionalTransparentSections list of strings
Scene hierarchy paths relative to the vehicle’s root transform to register as needing transparent sorting. Their render queue is periodically updated according to whether their pivot point is underwater.
Air_Steer_Max float32
The angle to turn when moving quickly, when using Engine Plane
. Defaults to the value of Steer_Max
.
Air_Steer_Min float32
The angle to turn when moving slowly, when using Engine Plane
. Defaults to the value of Steer_Min
.
Air_Turn_Responsiveness float32 2
Sensitivity on steering while airborne, when using Engine Plane
.
Battery_Burn_Rate float32 20
This controls the rate at which battery charge decreases per second.
Battery_Charge_Rate float32 20
This controls the rate at which battery charge increases per second.
Battery_Powered flag
The vehicle does not use fuel. For example, this flag is useful for creating electric vehicles.
Battery_Spawn_Charge_Multiplier float32 1
Battery charge on a newly-spawned vehicle is multiplied by this [0, 1] number. Setting this to a number less than 1
will result in the vehicle spawning with less battery charge than normal.
BatteryMode_Driving EBatteryMode Charge
How the vehicle battery should behave when a player is driving it.
BatteryMode_Empty EBatteryMode None
How the vehicle battery should behave when the vehicle is empty.
BatteryMode_Headlights EBatteryMode Burn
How the vehicle battery should behave when the headlights are on.
BatteryMode_Sirens EBatteryMode Burn
How the vehicle battery should behave when the siren is on.
Bicycle flag
Player character should use a bicycling animation.
Bicycle_Anim_Speed float32 0
Multiplier on the speed of the bicycling animation.
Brake float32
The amount of braking force to apply.
Buildable_Placement_Rule EVehicleBuildablePlacementRule None
This property overrides how barricades can be attached to the vehicle. View the EVehicleBuildablePlacementRule documentation for more information about the behavior of each option. Note that the Bypass_Buildable_Mobility
gameplay config option, when true
, will always take priority over this property.
The Supports_Mobile_Buildables
flag predates this property, and has since been deprecated. Its behavior can be replicated by using this property with the AlwaysAllow
value instead.
Bumper_Invulnerable flag
The vehicle cannot be damaged by collisions (such as with other vehicles, objects, placeables, or entities).
Bumper_Multiplier float32 1.0
Multiplier on the value for detecting collisions. When less than 1, the vehicle must be moving at a higher speed to enter a collision. When greater than 1, the vehicle can enter a collision while moving at a lower speed.
Bypass_Hash_Verification flag
Disable hash verification check, and allow for mismatched files.
Cam_Driver_Offset float32 0
The vertical offset for the driver’s first-person camera, in meters. This is additive with the value of Cam_Passenger_Offset
.
Cam_Follow_Distance float32 5.5
The distance behind the player the third-person camera should be placed at, in meters.
Cam_Passenger_Offset float32 0
The vertical offset for any passenger’s (including the driver’s) first-person camera, in meters.
Can_Be_Locked bool true
Whether or not the vehicle can be locked by a player.
Can_Repair_While_Seated bool false
When true
, this vehicle can be repaired by seated players.
Can_Steal_Battery bool true
Whether or not the vehicle battery can be removed from the vehicle by a player.
Cannot_Spawn_With_Battery flag
The vehicle does not spawn with a vehicle battery.
Carjack_Force_Multiplier float32 1.0
This is a multiplier on the force applied when using a Carjack on this vehicle. It is recommended that this property scales based on your vehicle’s mass.
Although this property was originally intended for modded vehicles, many official vehicles use this property as well. If you are creating a custom vehicle and using one of the example assets provided as a template (or have a mass that is similar to official content), you will likely want to use a value of 2
for this property.
The mass of official vehicles may be revisited in the future, to make collisions feel more reasonable. If this happens, the recommended value could be increased again.
Center_Of_Mass vector3
Overrides the vehicle’s center of mass on the 𝘟-, 𝘠-, and 𝘡-axis, when using Override_Center_Of_Mass true
. This allows for modifying a vehicle’s center of gravity without needing to move the “Cog” GameObject in Unity.
For example:
1Override_Center_Of_Mass true
2Center_Of_Mass (0, -50, 0)
Child_Explosion_Armor_Multiplier float32 0.2
This is a multiplier on the damage that barricades (and other buildables) placed on the vehicle receive, when damaged by explosions.
Crawler flag
Deprecated since version 3.23.4.0: Replaced by the WheelConfigurations
property.
Disables the Wheel_#
GameObjects from turning when steering by setting the default value of Num_Steering_Tires
to 0
. This property has no effect if Num_Steering_Tires
has been manually set.
Default_Battery GUID 098b13be34a7411db7736b7f866ada69
Battery item given to the player when a specific battery hasn’t been manually installed yet. Defaults to the Vehicle Battery used by official vehicles.
DefaultPaintColor_Configuration VehicleRandomPaintColorConfiguration
Determines the potential colors of a newly-spawned vehicle. Can be overridden by a Vehicle Redirector’s LoadPaintColor and LoadPaintColor properties.
This property is used with DefaultPaintColor_Mode RandomHueOrGrayscale
. For example:
1DefaultPaintColor_Mode RandomHueOrGrayscale
2DefaultPaintColor_Configuration
3{
4 MinSaturation 0.15
5 MaxSaturation 0.7
6 MinValue 0.15
7 MaxValue 0.9
8 GrayscaleChance 0.1
9}
DefaultPaintColor_Mode EVehicleDefaultPaintColorMode
This property controls the mode that should be used when randomly picking a paint color for a newly-spawned vehicle. Defaults to List
if DefaultPaintColors has been configured. Otherwise, defaults to None
. This can be manually set to RandomHueOrGrayscale
to pick a random HSV.
DefaultPaintColors list of colors
List of random colors to pick from when spawning a new vehicle. Can be overridden by a Vehicle Redirector’s LoadPaintColor and LoadPaintColor properties.
This property is used with DefaultPaintColor_Mode List
. For example:
1DefaultPaintColor_Mode List
2DefaultPaintColors
3[
4 "#353535" // Classic Black
5 "#37658c" // Classic Blue
6 "#2e642e" // Classic Green
7 "#bd6e27" // Classic Orange
8 "#6a466d" // Classic Purple
9 "#9a2525" // Classic Red
10 "#d4d4d4" // Classic White
11 "#cdaa1e" // Classic Yellow
12]
Drops_Max uint8 7
Maximum amount of item drops to spawn when the vehicle is destroyed.
Drops_Min uint8 3
Minimum amount of item drops to spawn when the vehicle is destroyed.
Drops_Table_ID uint16 962
ID of the item spawn table to use when the vehicle is destroyed. The default spawn table is Destroyed_Vehicle_Default.
Engine EEngine Car
The Engine
property determines the type of vehicle (e.g., car, plane, boat). Some vehicle properties are only usable depending on the vehicle’s Engine
.
Engine_Force_Multiplier float32 1.0
This is a multiplier on otherwise not-yet-configurable plane/heli/boat/etc. forces. It is recommended that this property scales based on your vehicle’s mass.
EngineMaxTorque float32 1.0
Multiplier for the amount of torque provided to the wheels. Understanding how engine RPM is translated to wheel torque is crucial for tuning the physics:
Engine RPM is normalized into a 0 to 1 range according to EngineIdleRPM and EngineMaxRPM. For example, an Engine RPM of 2000 with Idle RPM of 1000 and Max RPM of 5000 would be 0.25.
Vehicle root needs an
EngineCurvesComponent
attached. This allows you to map normalized engine RPM to a normalized torque multiplier. Typically, the multiplier should be closest to 1 in the middle range (e.g., 0.3 to 0.8) and drop off toward 0 and 1.Torque curve is sampled using the normalized engine RPM.
Sampled torque is multiplied by
EngineMaxTorque
.If changing gears, torque is zero.
If reversing, torque is multiplied by ReverseGearRatio.
Otherwise, torque is multiplied by the active ForwardGearRatio.
Each Powered Wheel gets an equal share of the torque. To clarify, the per-wheel torque is equal to the engine output torque divided by the number of powered wheels.
EngineRPM_DecreaseRate float32 10000.0
How quickly engine RPM can decrease in RPM/s. For example, 1000 will take 2 seconds to go from 4000 to 2000 RPM.
Note
Originally, I thought this might come in handy, but in practice tuning the torque and gear ratios worked better. Kept in case it comes in useful for somebody.
EngineSound RpmEngineSoundConfiguration
When EngineSound_Type is set to EngineRPMSimple
, this should be set to an RpmEngineSoundConfiguration dictionary.
EngineSound_Type EVehicleEngineSoundType Legacy
Defaults to Legacy
. In that mode, Pitch_Idle
and Pitch_Drive
are used to control engine audio pitch.
EngineIdleRPM float32 1000.0
Engine RPM will never drop below this value regardless of whether wheel RPM * gear ratio is lower. Otherwise, the engine wouldn’t be able to start the wheels rolling from zero.
EngineRPM_IncreaseRate float32 10000.0
How quickly engine RPM can increase in RPM/s. For example, 1000 will take 2 seconds to go from 2000 to 4000 RPM.
Note
Originally, I thought this might come in handy, but in practice tuning the torque and gear ratios worked better. Kept in case it comes in useful for somebody.
EngineMaxRPM float32 7000.0
Engine RPM will never exceed this value regardless of whether wheel RPM * gear ratio is higher. It should be kept to a reasonable value because the normalized engine RPM is used in a variety of places like sampling the torque curve and network replication.
Environment_Invulnerable flag
This vehicle cannot be damaged by animals, zombie melee attacks, or boulders thrown by mega zombies. Zombies and animals will still pursue the vehicle, and attempt to attack any passengers directly. Other damage sources can still damage the vehicle.
Exit float 2
Distance away from the vehicle to teleport when exiting.
Explosion GUID or uint16
GUID or legacy ID of EffectAsset to play when destroyed.
Explosion_Force_Multiplier float32 1.0
This is a multiplier on the force applied when the vehicle explodes. It is recommended that this property scales based on your vehicle’s mass.
Many official vehicles use this property. If you are creating a custom vehicle and using one of the example assets provided as a template (or have a mass that is similar to official content), you will likely want to use a value of 2
for this property.
Explosion_Max_Force vector3 (0, 1024, 0)
Maximum amount of force applied on the 𝘟-, 𝘠-, and 𝘡-axis, when the vehicle explodes.
Explosion_Min_Force vector3 (0, 1024, 0)
Minimum amount of force applied on the 𝘟-, 𝘠-, and 𝘡-axis, when the vehicle explodes.
Explosions_Invulnerable flag
The vehicle cannot be damaged by explosions.
ForwardGearRatios list of float32
Ratio between engine RPM and wheel RPM in a given gear. For example, if the wheel RPM is 6 and the gear ratio is 5 then the engine RPM is 30.
Note
When converting vanilla cars to gear ratios, the approach I used was to calculate the gear ratio for a desired speed and engine RPM. Suppose you’re targeting 80 kph with a wheel radius of 0.6 m:
Convert 80 kph to m/s, in this case, 22.2 m/s.
Calculate wheel circumference with 2 * pi * r, in this case 3.77 m.
Calculate how far the vehicle would travel in a minute. 22.2 m/s * 60 s/min is 1,333.2 m/min.
Divide the distance per minute by the circumference to get the wheel RPM of 353.6776.
Supposedly (I’m still learning as I go) engines work most efficiently around the upper-middle of their RPM range. For example, 3500 RPM for an engine with 1000 idle RPM and 6000 max RPM. Using 3500 as our target engine RPM we can divide it by the wheel RPM to get a good starting point for the gear ratio tuning: 9.89.
Fuel uint16 0
Total fuel capacity.
Fuel_Burn_Rate float32
This controls the rate at which fuel decreases per second. Defaults to 2.05
when using Engine Car
, or to 4.2
otherwise.
Fuel_Max uint16 0
Maximum possible fuel to spawn with.
Fuel_Min uint16 0
Minimum possible fuel to spawn with.
GearShift_DownThresholdRPM float32 1500.0
When engine RPM is below this value and a lower gear is available the car will shift gears down.
GearShift_Duration float32 0.5
How long it takes to shift gears, measured in seconds. Wheels do not provide any torque for this duration.
GearShift_Interval float32 1.0
How long to wait since the last gear change before shifting gears, measured in seconds. It can take a moment for the engine RPM to adjust after a gear change, so without a delay the RPM would still exceed the threshold.
GearShift_UpThresholdRPM float32 5500.0
When engine RPM is above this value and a higher gear is available the car will shift gears up.
GearShift_VisibleInHUD bool true
If gears are configured and this is true, RPM and gear number will be shown in the user interface.
GUID GUID
Refer to GUID documentation. Vehicles are required to have this property.
Tip
If the GUID property has been omitted from the asset file, then the game will automatically attempt to assign a random (and unique) GUID during a successful load.
Has_Clip_Prefab bool true
Whether or not the vehicle has a Clip.prefab. If the vehicle should use the same prefab on the server as on the client, set to false. For example, most official content uses Has_Clip_Prefab false
.
Has_Horn bool
Whether or not the vehicle should have a horn. Defaults to true
when the vehicle either has a Horn
AudioClip, or the HornAudioClip
property has been set to a valid path. Otherwise, defaults to false
.
Health uint16 0
Total health value.
Health_Max uint16 0
Minimum possible health to spawn with.
Health_Min uint16 0
Maximum possible health to spawn with.
HornAudioClip Master Bundle Pointer
AudioClip to play when using the horn.
ID uint16 0
Must be a unique identifier. This property used to be required by vehicles, but this is no longer necessary.
The range reserved for official content is [1, 2000).
IgnitionAudioClip Master Bundle Pointer
AudioClip to play after entering the driver’s seat.
Invulnerable flag
The vehicle cannot be damaged by lower-power Weapon Assets that do not have the Invulnerable
flag.
IsPaintable bool
If true
, Vehicle Paint Tools can be used on this vehicle. Defaults to true
if PaintableSections has been configured.
Lift float32 0
The amount of upwards lift force to apply, when using Engine Plane
.
LockMouse flag
First-person camera movement is locked while driving. This is useful for Engine Plane
and Engine Helicopter
, as a player’s mouse movement while in first-person can be used to steer the vehicle.
Num_Steering_Tires int32
Deprecated since version 3.23.4.0: Replaced by the WheelConfigurations
property.
Total number of tires that should turn when steering. Defaults to 2
when using Engine Car
, to 1
when using any other Engine
enumerator, or to 0
if the Crawler
property has been set.
Override_Center_Of_Mass bool false
If true
, overrides the vehicle’s center of mass with the values from the Center_Of_Mass
property. This allows for modifying a vehicle’s center of gravity without needing to move the “Cog” GameObject in Unity.
PaintableSections list of PaintableVehicleSection
If set, the vehicle can be painted with a Vehicle Paint Tool. Each section’s material’s _PaintColor
property is set to the vehicle’s paint color.
Passenger_Explosion_Armor float32 1
Multiplier on the damage taken by players sitting in the vehicle, by explosions.
Physics_Profile GUID
GUID of a VehiclePhysicsProfileAsset to use. Physics profiles allow for increased control over vehicle settings in bulk, but are not required for anything.
There are several default profiles. These are used when the vehicle’s Engine property has been set to Boat
, Car
, Helicopter
, or Plane
, if its WheelColliders also have a mass equal to 1.0. Otherwise, nothing is used by default.
Boat
defaults to47258d0dcad14cb8be26e24c1ef3449e
.Car
defaults to6b91a94f01b6472eaca31d9420ec2367
.Helicopter
defaults tobb9f9f0204c4462ca7d976b87d1336d4
.Plane
defaults to93a47d6d40454335b4784e803628ac54
.
Other vehicle types do not have a default profile.
Pitch_Drive float32
Multiplier on the pitch of the engine audio while driving. Defaults to 0.03
when using Engine Helicopter
, or to 0.1
when using Engine Blimp
. For other Engine
enumerators, it defaults to 0.025
if the audio clip is named “Engine_Large”, or to 0.075
if the audio clip is named “Engine_Small”. Otherwise, defaults to 0.05
.
Pitch_Idle float32
Multiplier on the pitch of the engine audio while idle. Defaults to 0.625
if the audio clip is named “Engine_Large”, or to 0.75
if the audio clip is named “Engine_Small”. Otherwise, defaults to 0.5
.
Rarity EItemRarity Common
Rarity of the item, as text shown in menus and colors used for highlights.
Reclined flag
Player character should use a reclined idle animation.
ReverseGearRatio float32 1.0
Gear ratio to use when reversing. Please refer to ForwardGearRatios for more details on gear ratios.
RollAngularVelocityDamping float32 -1.0
If greater than zero, an acceleration is applied to angular velocity on 𝘡-axis toward zero.
Should_Spawn_Seat_Capsules bool false
If true
, capsule colliders will be attached to the Seat
GameObject in order to prevent players from clipping into the ground. This is useful for vehicles that do not have a roof, such as bicycles.
ShouldExplosionBurnMaterials bool
When true
, the materials of the vehicle’s Model_#
GameObjects will be tinted black when the vehicle is destroyed. Defaults to true
if the Explosion
property is configured.
ShouldExplosionCauseDamage bool
When true
, the explosion caused by the vehicle being destroyed will deal damage to nearby entities, and kill any passengers. Defaults to true
if the Explosion
property is configured.
Size2_Z float32 0
Orthogonal camera size for economy icons.
Sleds flag
Tires should easily roll. For example, most planes will want to use this property.
Speed_Max float32 0
The vehicle’s maximum velocity to aim for while accelerating forward, in m/s (meters per second). For all Engine
enumerators except for the Train
enumerator, this value is multiplied by 1.25 because the vehicle adjusts wheel torque trying to match a specific speed. For example, a vehicle that uses Speed_Max 12.5
and is using Engine Car
will have a maximum forward speed of 56.25 kph (34.95 mph).
Speed_Min float32 0
The vehicle’s maximum velocity to aim for while accelerating in reverse, in m/s (meters per second). In-game, a vehicle’s speed is displayed as either kph (kilometers per hour) or mph (miles per hour). For example, a vehicle that uses Speed_Min -7
will have a maximum reversing speed of 25.2 kph (15.66 mph).
Stamina_Boost float32
When a value is specified, this property allows for using stamina to boost. The value specified is the multiplier on the speed a vehicle can go without using a stamina boost. For example, Stamina_Boost 0.5
would only let vehicle move at 50% its maximum speed normally, but using stamina to boost would it reach its maximum speed. This property is often used with Stamina_Powered
, but this is not required.
Stamina_Powered flag
The vehicle does not use fuel or a vehicle battery.
Steer_Max float32 0
Steering angle range at target maximum speed (for the current forward/backward direction). This value is multiplied by 0.75.
Steer_Min float32 0
Steering angle range at zero speed.
Steering_Angle_Turn_Speed float32
How quickly wheels can turn to meet player input, measured in degrees per second. Defaults to the value of Steer_Max * 5.0
.
Steering_LeaningForceMultiplier float32 -1.0
If greater than zero, torque is applied on 𝘡-axis according to steering input for bikes and motorcycles.
Steering_Tire_# int32
Deprecated since version 3.23.4.0: Replaced by the WheelConfigurations
property.
Set a Wheel_#
GameObject as a steering tire, which will visibly turn when steering. By default, a number of steering tires equal to the value of Num_Steering_Tires
will be automatically set. These will start at Steering_Tire_0 0
(corresponding to Wheel_0
), and increment upwards.
Tire_ID uint16 1451
ID of the item that should be given when a tire is manually removed with a ToolAsset that has Mode Remove
, and can also be manually attached to the vehicle if the specified item ID is for a ToolAsset with Mode Add
.
Tires_Invulnerable flag
Tires cannot be damaged.
Traction flag
Tires should have traction in snowy positions.
Train_Car_Length float32 0
The distance between each train car on the train, in meters. This property is used with Engine Train
.
Train_Track_Offset float32 0
The offset the train car is above the track, in meters. This property is used with Engine Train
.
Train_Wheel_Offset float32 0
The offset between the wheels, in meters. This property is used with Engine Train
.
Trunk_Storage_X uint8 0
Number of columns (horizontal storage space).
Trunk_Storage_Y uint8 0
Number of rows (vertical storage space).
Turret_#_Ignore_Aim_Camera flag
Normally, the player’s camera is positioned at the “Aim” GameObject. Including this flag will disable this feature.
Turret_#_Item_ID uint16 0
Legacy ID of the item usable from the turret seat. This is often used with a GunAsset that has the Turret
property. However, other items can be used – although most will function in unintended ways.
Turret_#_Pitch_Max float32 0
Maximum allowed rotation of the turret through the elevation, in degrees.
Turret_#_Pitch_Min float32 0
Minimum allowed rotation of the turret through the elevation, in degrees.
Turret_#_Seat_Index uint8 0
Index of the “Seat_#” GameObject that this turret is usable from. For example, 0
would correspond to “Seat_0”.
Turret_#_Yaw_Max float32 0
Maximum allowed rotation of the turret through the azimuth, in degrees. If this is set to 360
, it can rotate rightward forever.
Turret_#_Yaw_Min float32 0
Minimum allowed rotation of the turret through the azimuth, in degrees. If this is set to -360
, it can rotate leftward forever.
Turrets uint8 0
Total number of turrets on the vehicle. All other turret-related properties require that this property has been configured.
For example, this is how the Fighter Jet is configured:
1Turrets 1
2Turret_0_Seat_Index 0
3Turret_0_Item_ID 1471
4Turret_0_Yaw_Min -135
5Turret_0_Yaw_Max 135
6Turret_0_Pitch_Min 85
7Turret_0_Pitch_Max 180
8Turret_0_Ignore_Aim_Camera
Type EAssetType
Designates the vehicle’s class. Vehicle assets are required to have this property.
Valid_Speed_Down float32
Configuring this will override the sanity check for reversing speed, in m/s (meters per second). If reversing speed exceeds this, the movement is marked as invalid.
Defaults to 25
when using Engine Car
or Engine Boat
, or to 100
otherwise.
Valid_Speed_Horizontal float32
Configuring this will override the sanity check for horizontal speed. This value is multiplied by PlayerInput.RATE (0.08)
, and then squared.
Defaults to (Speed_Max * 0.125)^2
when using Engine Helicopter
or Engine Blimp
, or to (Speed_Max * 0.1)^2
otherwise. This property is useful for vehicles with speed that the server cannot predict, such as force-applying Unity components.
Valid_Speed_Up float32
Configuring this will override the sanity check for forward speed, in m/s (meters per second). If forward speed exceeds this, the movement is marked as invalid.
Defaults to 12.5 when using Engine Car
, to 3.25 when using Engine Boat
, or to 100 otherwise.
Wheel_Collider_Mass_Override float32 null
Override the mass of the vehicle’s WheelCollider components. This allows for quickly modifying the mass of the wheel colliders without needing to rebundle the asset in Unity. If a vehicle has realistic mass, then it may be helpful to set this value to something exceptionally high (e.g., 500
).
WheelBalancing_ForceMultiplier float32 -1.0
If greater than zero, torque is applied on the Z axis multiplied by this factor to align vehicle up with ground up.
Note
RollAngularVelocityDamping is critical for damping this force.
WheelBalancing_UprightExponent float32 1.5
Exponent on the 0 to 1 factor representing how aligned the vehicle is with the ground up vector. For example, a value of 2 would apply much less force while nearly aligned with up, whereas a value of 0.5 would apply more force even while nearly aligned with up.
WheelConfigurations list of VehicleWheelConfiguration
Controls WheelCollider components and their corresponding visual models. When converting older vehicles, enable the -LogVehicleWheelConfigurations
command-line flag to output an equivalent wheel configuration.
For example, this is how the Ambulance is configured:
1WheelConfigurations
2[
3 {
4 WheelColliderPath Tires/Tire_0
5 IsColliderSteered true
6 IsColliderPowered true
7 ModelPath Wheels/Wheel_0
8 ModelUseColliderPose true
9 }
10 {
11 WheelColliderPath Tires/Tire_1
12 IsColliderSteered true
13 IsColliderPowered true
14 ModelPath Wheels/Wheel_1
15 ModelUseColliderPose true
16 }
17 {
18 WheelColliderPath Tires/Tire_2
19 IsColliderSteered false
20 IsColliderPowered false
21 ModelPath Wheels/Wheel_2
22 ModelUseColliderPose true
23 }
24 {
25 WheelColliderPath Tires/Tire_3
26 IsColliderSteered false
27 IsColliderPowered false
28 ModelPath Wheels/Wheel_3
29 ModelUseColliderPose true
30 }
31]
Zip flag
Player character should use a handlebar idle animation.
PaintableVehicleSection Dictionary Descriptions
Path string
Scene hierarchy path to a Renderer component relative to the vehicle’s root transform.
MaterialIndex int32 0
Index into Renderer component’s Materials list. For example, 0
is the 1st material, 1
is the 2nd material, and so forth.
RpmEngineSoundConfiguration Dictionary Descriptions
IdlePitch float32 0.0
AudioSource pitch when engine RPM is at Idle RPM.
IdleVolume float32 0.0
AudioSource volume when engine RPM is at Idle RPM.
MaxPitch float32 0.0
AudioSource pitch when engine RPM is at Max RPM.
MaxVolume float32 0.0
AudioSource volume when engine RPM is at Max RPM.
VehicleRandomPaintColorConfiguration Dictionary Descriptions
MinSaturation float32 0.0
Minimum random saturation in HSV color to generate.
MaxSaturation float32 0.0
Maximum random saturation in HSV color to generate.
MinValue float32 0.0
Minimum value or brightness in HSV color to generate.
MaxValue float32 0.0
Maximum value or brightness in HSV color to generate.
GrayscaleChance float32 0.0
[0, 1] color will have zero saturation if random value is less than this. For example, 0.2 means 20% of vehicles will be grayscale.
VehicleWheelConfiguration Dictionary Descriptions
CopyColliderRpmIndex int32 -1
If set, visual-only wheels without a collider (like the back wheels of the snowmobile) can copy RPM from a wheel that does have a collider. Requires ModelRadius to also be set.
IsColliderPowered bool false
If true
, collider is connected to the engine and responds to player’s acceleration input.
IsColliderSteered bool false
If true
, collider’s steering angle responds to player input.
IsModelSteered bool false
If true
, model is rotated according to steering input.
Only kept for backwards compatibility. Prior to wheel configurations, only certain WheelColliders actually received steering input, while multiple models would appear to steer. For example, the APC’s front 4 wheels appeared to rotate but only the front 2 actually affected physics.
ModelPath string
Scene hierarchy path of visual representation of wheel relative to the vehicle’s root transform.
ModelRadius float32 -1.0
If greater than zero, visual-only wheels (without a collider) like the extra wheels of the Snowmobile use this radius to calculate their rolling speed.
ModelUseColliderPose bool false
If true
, model ignores IsModelSteered
and instead uses the wheel collider state (or an approximation when not simulating).
Prior to wheel configurations, some high-fidely modded cars used a separate set of physics constraints to animate the wheel models as if they had suspension. Constraint setups like this should be completely superseded by the ModelUseColliderPose
property. The constraints were awful for performance because physics for every purely-visual wheel were simulated on every client, and even then they didn’t actually match the real wheel state.
WheelColliderPath string
Scene hierarchy path of a WheelCollider component relative to the vehicle’s root transform.
Localization
Name string: Vehicle name in user interfaces.