Class EffectManager
Manages vehicle visual effects: exhaust particles, lights, skidmarks, and surface dust/smoke.
Inherited Members
Namespace: NWH.VehiclePhysics2.Effects
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class EffectManager : ManagerVehicleComponent
Fields
exhaustFlash
Controls exhaust flash effects that create brief bright flashes from the exhaust pipe. Triggered by rev-limiter and gear-shift events, and by NOSModule.
Declaration
public ExhaustFlash exhaustFlash
Field Value
| Type | Description |
|---|---|
| ExhaustFlash |
Remarks
flashChance is rolled once per triggering event; each flash picks a random texture and a random scale. Flashes are suppressed while the engine is off, cranking, or below 40% of the RPM range unless flashWhenEngineOff is enabled.
exhaustSmoke
Manages exhaust smoke particle systems that emit from exhaust pipe positions. Emission rate, particle size and start speed scale with engine RPM.
Declaration
public ExhaustSmoke exhaustSmoke
Field Value
| Type | Description |
|---|---|
| ExhaustSmoke |
Remarks
Engine load darkens the smoke toward sootColor; density follows RPM. Emission stops entirely while the engine is not running.
lightsManager
Central controller for all vehicle lighting systems including headlights, brake lights, turn signals, reverse lights, and hazard warning systems.
Declaration
[FormerlySerializedAs("lights")]
public LightsManager lightsManager
Field Value
| Type | Description |
|---|---|
| LightsManager |
skidmarkManager
Handles real-time skidmark generation and rendering based on wheel slip conditions. Creates persistent tire marks on surfaces when lateral or longitudinal slip exceeds thresholds.
Declaration
[FormerlySerializedAs("skidmarks")]
public SkidmarkManager skidmarkManager
Field Value
| Type | Description |
|---|---|
| SkidmarkManager |
Remarks
Marks fade over time; the mesh is combined and culled to keep the cost down.
surfaceParticleManager
Controls surface-specific particle effects such as dust, dirt, water splashes, and snow displacement. Effects are automatically selected based on the surface type detected by the ground detection system.
Declaration
public SurfaceParticleManager surfaceParticleManager
Field Value
| Type | Description |
|---|---|
| SurfaceParticleManager |
Remarks
Intensity scales with wheel speed and slip.
Methods
FillComponentList()
Override to populate _components with your child components. Called lazily on first Components access.
Declaration
protected override void FillComponentList()