Namespace NWH.VehiclePhysics2.Sound.SoundComponents
Classes
AirBrakeComponent
Pneumatic brake release hiss, as heard on trucks and buses. Plays only while the engine is running and chooses randomly from the assigned audio clips.
BlinkerComponent
Rhythmic clicking sound of turn signal indicators. Plays distinct sounds for blinker on and off states, synchronized with the blinking lights. Requires two audio clips: first for the 'on' click, second for the 'off' click. Automatically triggered by left or right blinker light sources in the Lights Manager.
CrashComponent
Plays a vehicle collision sound at the contact point, with volume scaled by collision velocity magnitude. Chooses randomly from the assigned audio clips.
EngineFanComponent
Simulates cooling fan or air induction noise that varies with engine RPM. Volume increases quadratically with RPM to simulate fan speed, while pitch increases linearly. Commonly used for commercial vehicles, off-road vehicles with clutch-driven fans, or to add air intake/induction noise to the engine sound.
EngineRunningComponent
Granular engine audio synthesis using per-vehicle AudioSources. Crossfades multiple RPM samples and controls source-local lowpass, distortion, and dry-level gain.
EngineRunningComponent.EngineSample
Single RPM sample with associated AudioSource.
EngineStartStopComponent
Starter and shutdown sounds, driven by the engine onStart/onStop events. Clip 0 is the start sound, pitched by cranking RPM; clip 1 is the optional shutdown sound.
ExhaustPopComponent
Exhaust popping and backfire sound. Triggered during deceleration, gear shifts, or when hitting rev limiter.
ForcedInductionComponent
Turbocharger or supercharger whine sound. Volume and pitch scale with boost level. Includes spool-up/down inertia.
GearChangeComponent
Plays a mechanical shifter sound when the transmission changes gear, except when shifting into neutral (gear 0). Chooses randomly from the assigned audio clips.
HornComponent
Loops the horn sound while horn input is active and stops immediately on release, allowing both short beeps and sustained honks.
ReverseBeepComponent
Repeating beep warning sound played when vehicle is reversing. Commonly heard on trucks, buses, and construction vehicles. Beeps once per second when active. Can be triggered by reverse gear engagement or backward movement regardless of gear.
SoundComponent
Base class for vehicle sound components. Creates and owns one AudioSource on the container GameObject, routes it through the mixer group, and applies the SoundManager master volume.
SuspensionBumpComponent
Impact sound played when a wheel makes contact with the ground or obstacles. Triggered when wheels transition from airborne to grounded state. Volume scales with the wheel load relative to its load rating. Common during jumps, drops, or hitting bumps. Includes a 2-second startup delay to prevent false triggers when the vehicle spawns.
TransmissionWhineComponent
Straight-cut gearbox whine sound. Pitch follows RPM, volume follows load.
TurboFlutterComponent
Turbo flutter and wastegate release sound. Triggered when wastegate opens.
WheelSkidComponent
Tire skid sound. Plays while a wheel slips laterally or longitudinally past the skid threshold, with volume scaled by slip and speed. Clip and settings come from the dominant surface's SurfacePreset and swap when the dominant surface changes.
WheelTireNoiseComponent
Continuous tire rolling noise. Plays while wheels are grounded, volume and pitch scaling with speed and optionally with lateral slip. Clip and levels come from the dominant SurfacePreset, so the clip switches when the dominant surface changes.
Enums
ExhaustPopComponent.PopSource
Defines the trigger source for exhaust pop sounds.