NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class SurfaceParticleManager

    Owns one SurfaceParticleSystem per wheel: smoke on slip, dust when rolling over loose surfaces.

    Inheritance
    object
    VehicleComponent
    Effect
    SurfaceParticleManager
    Inherited Members
    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.Effects
    Assembly: NWH.VehiclePhysics2.dll
    Syntax
    [Serializable]
    public class SurfaceParticleManager : Effect
    Remarks

    The coefficients here scale all wheels on this vehicle. Look and per-surface rates live in the SurfacePresets.

    Fields

    binaryEmission

    When enabled, smoke either fully emits or does not, with no interpolation. Only affects surfaces whose SurfacePreset particleType is Smoke. Dust presets derive emission from speed and ignore this flag.

    Declaration
    [Tooltip("When enabled the particle system will either emit or not emit, with no in-between. Also removes any smoothing.\r\nOnly applies when the surface particle type is Smoke.")]
    public bool binaryEmission
    Field Value
    Type Description
    bool

    emissionRateCoeff

    Per-vehicle emission rate multiplier applied to all wheels. Per-surface rates live in the SurfacePresets.

    Declaration
    [Range(0, 2)]
    [Tooltip("Emission rate multiplier specific to this vehicle.\r\nUse to adjust emission on per-vehicle basis.\r\nFor global emission adjustment for individual surfaces check SurfacePresets.")]
    public float emissionRateCoeff
    Field Value
    Type Description
    float

    lateralSlipParticleCoeff

    How much lateral slip feeds emission. Smoke presets only; dust emits off speed instead.

    Declaration
    [Range(0, 5)]
    [Tooltip("How much will lateral slip contribute to the particle emission.\r\nIgnored when particle type for the surface is set to other than Smoke.")]
    public float lateralSlipParticleCoeff
    Field Value
    Type Description
    float

    longitudinalSlipParticleCoeff

    How much longitudinal slip (wheelspin, lockup) feeds emission. Smoke presets only; dust emits off speed instead.

    Declaration
    [Range(0, 5)]
    [Tooltip("How much will longitudinal slip contribute to the particle emission.\r\nIgnored when particle type for the surface is set to other than Smoke.")]
    public float longitudinalSlipParticleCoeff
    Field Value
    Type Description
    float

    particleSizeCoeff

    Per-vehicle particle size multiplier applied to all wheels. Per-surface sizes live in the SurfacePresets.

    Declaration
    [Range(0, 2)]
    [Tooltip("Particle size multiplier specific to this vehicle.\r\nUse to adjust particle size on per-vehicle basis.\r\nFor global particle size adjustment for individual surfaces check SurfacePresets.")]
    public float particleSizeCoeff
    Field Value
    Type Description
    float

    Methods

    VC_Disable(bool)

    Disables the component and stops its updates.

    Declaration
    public override bool VC_Disable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent

    True when called by a parent ManagerVehicleComponent fan-out or the VehicleController enable/disable loop. The LOD system passes false.

    Returns
    Type Description
    bool

    True if successfully disabled, false otherwise

    Overrides
    VehicleComponent.VC_Disable(bool)
    Remarks

    Refused on a component that is not initialized. Records whether the call came from a parent, which is what VC_Enable checks before a bulk re-enable.

    VC_Enable(bool)

    Enables the component and starts its updates.

    Declaration
    public override bool VC_Enable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent

    True when called by a parent ManagerVehicleComponent fan-out or the VehicleController enable/disable loop. The LOD system passes false.

    Returns
    Type Description
    bool

    True if successfully enabled, false otherwise

    Overrides
    VehicleComponent.VC_Enable(bool)
    Remarks

    Initializes the component first if it is not initialized yet. A parent bulk enable is refused unless the last disable also came from a parent, so it cannot resurrect a component turned off by LOD, by a script, or disabled in StateSettings.

    VC_Initialize()

    One-time setup, once per vehicle startup and after the VehicleController reference is set. Sets state.initialized on completion; an override that fails must leave it false.

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

    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