NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    VehicleComponent
    SoundComponent
    SuspensionBumpComponent
    Inherited Members
    SoundComponent.baseVolume
    SoundComponent.clips
    SoundComponent.source
    SoundComponent.InitializeWithNoClips
    SoundComponent.Clip
    SoundComponent.InitLoop
    SoundComponent.InitClip
    SoundComponent.InitVolume
    SoundComponent.InitSpatialBlend
    SoundComponent.InitDopplerLevel
    SoundComponent.InitPlayOnAwake
    SoundComponent.RandomClip
    SoundComponent.HasPlayableClip
    SoundComponent.CreateAndRegisterAudioSource(AudioMixerGroup, GameObject)
    SoundComponent.VC_Disable(bool)
    SoundComponent.PlayRandomClip()
    SoundComponent.PlayForDurationCoroutine(int, float)
    SoundComponent.Play()
    SoundComponent.Play(int)
    SoundComponent.SetPitch(float)
    SoundComponent.SetVolume(float)
    SoundComponent.Stop()
    SoundComponent.AddDefaultClip(string)
    VehicleComponent.state
    VehicleComponent.vehicleController
    VehicleComponent.IsActive
    VehicleComponent.VC_Initialize(VehicleController)
    VehicleComponent.VC_LoadStateFromStateSettings()
    VehicleComponent.VC_Update(float)
    VehicleComponent.VC_DrawGizmos()
    VehicleComponent.VC_Validate(VehicleController)
    VehicleComponent.UpdateLOD()
    VehicleComponent.ToggleState()
    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
    SoundComponent.AudioMixerGroup

    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
    SoundComponent.ContainerGO

    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
    SoundComponent.Priority

    Methods

    VC_Enable(bool)

    Enables the AudioSource belonging to this SoundComponent.

    Declaration
    public override bool VC_Enable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent
    Returns
    Type Description
    bool
    Overrides
    SoundComponent.VC_Enable(bool)

    VC_FixedUpdate(float)

    Fixed-timestep update for forces, torques and other physics work. Called from VehicleController.FixedUpdate(), and only while the component is active.

    Declaration
    public override void VC_FixedUpdate(float DeltaTime)
    Parameters
    Type Name Description
    float DeltaTime

    Time elapsed since last FixedUpdate in seconds

    Overrides
    VehicleComponent.VC_FixedUpdate(float)

    VC_Initialize()

    Initializes the legacy grounded-state buffer. Retained as an override for subclasses compiled against Beta 2; enable-time initialization still owns runtime reset behavior.

    Declaration
    protected override void VC_Initialize()
    Overrides
    SoundComponent.VC_Initialize()

    VC_SetDefaults()

    Writes default values into every serialized field, and may pull default assets from Resources. Runs on vehicle reset and when the component is first added.

    Declaration
    public override void VC_SetDefaults()
    Overrides
    VehicleComponent.VC_SetDefaults()
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics