Audio System

This document covers RCC's audio system — engine sounds, gear shifts, crash impacts, exhaust, wind, brake squeal, NOS / turbo, indicator clicks, and surface-specific tire audio. The goal is to teach you what audio sources exist on a vehicle, how to swap in your own clips, and how to configure the audio for different vehicle types (sports car, truck, electric vehicle).

Audio Architecture

Every vehicle has multiple AudioSource components, each handling a specific category:

Audio Source What It Plays
Engine — low RPM layer Engine idle / low-rev sound.
Engine — mid RPM layer Engine mid-range sound.
Engine — high RPM layer Engine high-rev sound.
Engine Off Sound when engine is off (silence or wind only).
Exhaust Exhaust note (often a separate, more directional source).
Gear Shift Plays on each shift.
Wind Continuous, scaled by speed.
Brake Brake squeal at high braking.
Reverse Beep Beeping when reversing (optional).
Crash One-shot on collision.
Wheel Slip One per wheel, plays surface-specific slip sound.
Wheel Bump One per wheel, plays on suspension hits.
Wheel Deflate One-shot when a tire pops.
NOS Boost / nitrous sound.
Turbo Turbocharger whistle.
Indicator Click Tick-tock sound while indicator is on.

This is more audio sources than you'd think, but Unity handles a few dozen sources per scene with no trouble. The vehicle prefab wires them all to a parent transform; the audio listener (on the camera) hears them.

Engine Sound Layers

The most important audio is the engine. RCC supports multi-layer crossfading between up to three audio sources for realistic engine sound. Each layer has a different recording of the engine — low RPM, mid RPM, high RPM — and the system crossfades between them based on current RPM.

Audio Type Setting

On RCC_CarControllerV4, the Audio Type field controls how many layers are used:

Crossfading Math

In ThreeSource mode, each layer has its own volume curve:

The result is a smooth blend that sounds like a single continuous engine note across the entire RPM range.

Pitching

In addition to crossfading, each layer's pitch shifts with RPM. The pitch ratio is configured by Min Engine Sound Pitch and Max Engine Sound Pitch on the controller (defaults 0.5 and 1.7 — meaning the audio plays at half speed at idle and 1.7× speed at redline).

Pitching is what makes the engine rev — without it, the audio would feel static.

Swapping Engine Clips

To use your own engine recording:

  1. Import your audio clip into the project as .wav, .ogg, or .mp3.
  2. Set Load Type to Compressed In Memory for mobile (saves RAM) or Streaming for very long clips.
  3. Set Force To Mono if it's a stereo clip (engines are usually mono in vehicle prefabs because they're positioned in 3D space).
  4. On the vehicle, expand the Audio section.
  5. Drag your clip into the appropriate field (e.g., Engine High Audio Clip).

For best results, record or source three loops:

Each clip should be a clean loop (the end seamlessly connects to the beginning). Tools like Audacity can help you find a good loop point.

Free engine sound packs are available — search "free game engine sound effects loops" or buy a sound effects library.

Gear Shift Audio

When the gearbox shifts, RCC plays a random clip from RCC_Settings.gearShiftingClips[]. This is an array of variations so successive shifts don't sound identical.

To add your own:

  1. Open RCC_Settings.asset.
  2. Find the Gear Shifting Clips array.
  3. Add elements and drag your clips in.

The max volume of gear shift audio is maxGearShiftingSoundVolume (default 0.25 — quiet enough to mix below the engine).

Crash Audio

Same pattern as gear shifts — RCC_Settings.crashClips[] is an array of random crash variations.

The crash is played on OnCollisionEnter when the relative velocity exceeds a threshold. Light scrapes don't trigger a full crash sound — they trigger scratchParticles and a small audio dip. Big impacts trigger the crash clip.

maxCrashSoundVolume in settings controls the max volume (default 1.0).

Wind Audio

Wind noise scales with vehicle speed. At 0 km/h, no wind. At top speed, the wind audio is at maxWindSoundVolume (default 0.1 — wind shouldn't drown out the engine).

The clip is windClip in RCC_Settings. Replace it with your own if you want a more or less aggressive wind sound.

Brake Audio

When braking hard, RCC plays a brake squeal sound. The clip is brakeClip in settings, max volume maxBrakeSoundVolume (default 0.1 — squeal should be subtle).

Brake audio is velocity-modulated: it doesn't play at all if you're braking from a near-stop, only triggers when there's high relative motion that would generate squeal in reality.

Exhaust Audio

The exhaust audio is separate from the engine layers because it's positioned at the tailpipe transform — a listener walking around the car hears the exhaust from behind, not from under the hood.

Exhaust uses one of the engine layers (typically the high RPM one) but routed through a separate AudioSource positioned at the exhaust outlet.

Surface-Specific Tire Audio

Each wheel has an AudioSource for slip/skid audio. The clip played depends on the current ground material — asphalt squeal, gravel rumble, snow crunch, etc. See 11 — Ground Physics for how surfaces are configured.

The slip audio volume scales with wheel slip — a heavily-sliding wheel is loud, a barely-slipping wheel is faint.

Bump Audio

When the suspension bottoms out (a big bump, landing from a jump), the wheel plays a bumpClip from RCC_Settings. This is a one-shot — it doesn't loop.

Tire Deflation / Flat Tire Audio

When a tire deflates, wheelDeflateClip plays once. While driving on a flat, wheelFlatClip loops at the wheel's audio source (a low, rough rumble).

When the tire is repaired, wheelInflateClip plays once.

All three are configured in RCC_Settings.

NOS / Turbo Audio

If your vehicle uses NOS (nitrous):

If your vehicle uses a turbocharger:

Both are off by default — turn them on per-vehicle by enabling useNOS or useTurbo on RCC_CarControllerV4.

Indicator Clicks

When indicator lights are on, RCC plays the indicatorClip from settings at regular intervals (matched to the blink rate). The sound is positioned at the dashboard (so it's "inside the car").

If you don't want indicator sounds, set the clip to None in settings.

Audio Mixer Group

All RCC audio routes through a single AudioMixerGroup (configured in RCC_Settings.audioMixer). This gives you a single volume slider for "vehicle audio" — set it to taste in your game's settings menu.

You can replace the default mixer:

  1. Create a new AudioMixer asset.
  2. Add a group called "RCC".
  3. In RCC_Settings.asset, assign the new mixer group to Audio Mixer.

You can also route specific sub-categories through different mixer groups by editing the AudioSource references on the vehicle prefab — but the global setting is the simplest.

Tuning Audio for Different Vehicle Types

Sports Car

Truck / Diesel

Electric Vehicle

Motorcycle

Adding Custom Audio Events

You can add your own audio reactions to events through RCC_Events:

using UnityEngine;

public class CustomAudio : MonoBehaviour {
    public AudioSource shiftWooshSound;

    void OnEnable() {
        RCC_Events.OnGearShiftUp += PlayWoosh;
    }

    void OnDisable() {
        RCC_Events.OnGearShiftUp -= PlayWoosh;
    }

    void PlayWoosh() {
        shiftWooshSound.Play();
    }
}

See 24 — Events System for the full event list.

Performance Considerations

Each active AudioSource costs some CPU and memory bandwidth. A typical vehicle has roughly 10–15 active sources. With 5 vehicles in a scene, that's 50–75 sources — fine for desktop, may push mobile.

For mobile or VR:

Common Audio Issues

"I can't hear the engine"

Check:

  1. The vehicle has AudioType not set to Off.
  2. The engine audio clips are assigned in the Inspector.
  3. The scene has only one AudioListener (on the camera).
  4. The scene's master volume isn't muted.

"The engine sounds chipmunky / too high-pitched"

Max Engine Sound Pitch is too high. Drop to 1.5 or 1.6.

"The engine sounds the same at all RPMs"

Min Engine Sound Pitch and Max Engine Sound Pitch are too close together. Spread them — e.g., 0.5 to 1.8.

"The engine sound cracks / clicks during shifts"

The crossfade between layers isn't smooth. Try ThreeSource audio with carefully tuned crossfade curves, or use a single longer engine clip in OneSource mode.

"Crash audio plays for tiny scrapes"

The crash volume threshold is too low. The actual threshold is internal to the controller — you may need to scale maxCrashSoundVolume down, or modify the velocity threshold in the controller (advanced).

"Audio is positional but I want it global"

By default, RCC sets each AudioSource's Spatial Blend to ~0.8 (mostly 3D, slightly 2D). To make audio fully 2D (the same in both ears regardless of camera position), set Spatial Blend = 0 on the relevant AudioSource.

Next Steps