NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    VehicleComponent
    SoundComponent
    WheelSkidComponent
    Inherited Members
    SoundComponent.baseVolume
    SoundComponent.clips
    SoundComponent.source
    SoundComponent.Clip
    SoundComponent.InitClip
    SoundComponent.InitVolume
    SoundComponent.InitSpatialBlend
    SoundComponent.InitDopplerLevel
    SoundComponent.RandomClip
    SoundComponent.HasPlayableClip
    SoundComponent.VC_Initialize()
    SoundComponent.CreateAndRegisterAudioSource(AudioMixerGroup, GameObject)
    SoundComponent.VC_Enable(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_FixedUpdate(float)
    VehicleComponent.VC_SetDefaults()
    VehicleComponent.VC_LoadStateFromStateSettings()
    VehicleComponent.VC_DrawGizmos()
    VehicleComponent.VC_Validate(VehicleController)
    VehicleComponent.UpdateLOD()
    VehicleComponent.ToggleState()
    Namespace: NWH.VehiclePhysics2.Sound.SoundComponents
    Assembly: NWH.VehiclePhysics2.dll
    Syntax
    [Serializable]
    public class WheelSkidComponent : 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

    InitLoop

    Gets whether the AudioSource should loop continuously. Override in derived classes to enable looping for continuous sounds like engine running.

    Declaration
    public override bool InitLoop { get; }
    Property Value
    Type Description
    bool
    Overrides
    SoundComponent.InitLoop

    InitPlayOnAwake

    Gets whether the AudioSource should automatically play on awake.

    Declaration
    public override bool InitPlayOnAwake { get; }
    Property Value
    Type Description
    bool
    Overrides
    SoundComponent.InitPlayOnAwake

    InitializeWithNoClips

    Gets whether this component can be initialized without any audio clips assigned. Most components require at least one clip to function.

    Declaration
    public override bool InitializeWithNoClips { get; }
    Property Value
    Type Description
    bool
    Overrides
    SoundComponent.InitializeWithNoClips

    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_Disable(bool)

    Stops and disables the AudioSource belonging to this SoundComponent.

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

    VC_Update(float)

    Per-frame update for input, visuals and UI. Only called while the component is active. Physics belongs in VC_FixedUpdate, not here.

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

    Time elapsed since last Update in seconds

    Overrides
    VehicleComponent.VC_Update(float)
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics