Class 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.
Inherited Members
Namespace: NWH.VehiclePhysics2.Sound.SoundComponents
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class SuspensionBumpComponent : SoundComponent
Properties
AudioMixerGroup
Gets the Audio Mixer Group this component's AudioSource should output to. Used to route audio through the vehicle's audio mixer for processing and mixing.
Declaration
public override AudioMixerGroup AudioMixerGroup { get; }
Property Value
| Type | Description |
|---|---|
| AudioMixerGroup |
Overrides
ContainerGO
Gets the GameObject container where the AudioSource should be created. Used to position audio sources at specific locations on the vehicle.
Declaration
public override GameObject ContainerGO { get; }
Property Value
| Type | Description |
|---|---|
| GameObject |
Overrides
Priority
Gets the priority level for the AudioSource. Lower values indicate higher priority. Range is 0 (highest) to 256 (lowest). Used by Unity's audio system when the maximum number of audio sources is reached.
Declaration
public override int Priority { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
Methods
VC_FixedUpdate(float)
Physics update called at fixed intervals. Override to implement physics-based behavior.
Declaration
public override void VC_FixedUpdate(float DeltaTime)
Parameters
| Type | Name | Description |
|---|---|---|
| float | DeltaTime | Time elapsed since last FixedUpdate in seconds |
Overrides
Remarks
Only called when the component is active (initialized and enabled). Use for physics calculations, force application, and other fixed-timestep operations. Called from VehicleController.FixedUpdate().
VC_Initialize()
Initializes the component's internal systems and resources. Called once during vehicle startup after the VehicleController reference is set.
Declaration
protected override void VC_Initialize()
Overrides
Remarks
Override this to set up component-specific resources, cache references, or perform one-time initialization. Sets state.initialized to true on completion.
VC_SetDefaults()
Resets the component to default configuration. Override to provide component-specific default values.
Declaration
public override void VC_SetDefaults()
Overrides
Remarks
Called when the vehicle is reset or when first added to a GameObject. Should set all serialized fields to sensible default values. May load default assets from Resources folder.