Effect system makes use of VehicleComponents and therefore each
Effect can be turned on or off, be enabled or disable or have LOD set.
Effects with manager in the name manage multiple instances of the effect, usually one for each wheel - e.g. skidmarks or surface particles.
Effect is used to imitate flames shooting out of exhaust. The method to achieve this is identical to the one used for most muzzle flash in FPS games; that is a set of images gets enabled and disabled at rapid rate with different sprite and scale each time. This is a performant way to achieve the effect while avoiding particle effects.
Quads perpendicular to each other. Move them to the location of the exhaust.
Particles/Standard Unlit(Unity 2019) or equivalent shader with
Multiplycolor mode. The included example on Sports Car prefab can be copied. Assigning one of the included flame textures will show if the rotation of the
Quadis correct. Rotate
MeshRenderers from the newly created Quads to the
To make flames look more convincing a random texture is assigned to each Quad on each flash. A number of default textures is included.
ExhaustSmoke controls exhaust
ParticleSystem color, size and emission speed. It interpolates between
SootColor based on engine state.
ParticleSystems at vehicle exhaust position. Prefab of pre-configured
ParticleSystemcomes with the asset (Effects > Particles > Prefabs).
ParticleSystems to the
Particle Systemslist inside
VehicleLight is a collection of
LightSources. When the light is turned on all
LightSources are turned on and vice versa.
One vehicle light source. Can be a
Light or emissive
Lightis selected as
Lightcan be assigned. It will be turned on and off according to user input.
Meshis selected as
Standardshader can be used. It's
Emissionfield will be toggled to imitate a working light. Since this does not emit enough light to be a headlight usually another light source is used in tandem, this one with
For an emissive mesh light to work it needs to be a separate object. If the model does not come with lights and blinkers as separate objects these will need to be separated in 3D modelling software such as Blender (free, open source).
Mesh light source make sure to tick the
Emission checkbox on the material. This lets Unity know that this variant of the material is in use and should be included in the build.
Skidmarks are generated when wheel skids / slips over a surface.
Max Marks Per Section * 2.
Min Distanceis the distance a wheel needs to travel before a new mark is created.
Max Marks Per Section- similar to the old snake game. To make this transition smooth
Fade Over Distancecan be enabled or
Peristent Skidmarkscan be used. Check the section below for more info.
GrounOffsetneeds to be increased.
Longitudinal Slip Thresholdand
Lateral Slip Thresholdfrom vehicle settings tab are used.
SurfacePresetto get the settings for the current surface type.
SurfaceParticleManager creates and manages particles based on current
Lateral Slip Thresholdand
Longitudinal Slip Thresholdunder Settings tab determine the lowest wheel slip threshold needed for wheel to be considered to be slipping. This affects particle effects.