Class ExhaustSmoke
Controls particle emitters that simulate engine exhaust smoke, dynamically adjusting particle properties based on engine RPM, throttle position, and airspeed.
Namespace: NWH.Aerodynamics.AircraftController.Effects.Exhausts
Assembly: NWH.Aerodynamics.dll
Syntax
[Serializable]
[RequireComponent(typeof(AircraftEngineBase))]
public class ExhaustSmoke : MonoBehaviour
Remarks
Exhaust characteristics change with engine state: at idle or low throttle, exhaust is lighter colored (normal/white smoke), while under heavy load darker soot particles are emitted. Particle lifetime automatically adjusts based on airspeed to maintain consistent visual trail length. Speed, size, and color all scale with engine operating conditions for realistic exhaust behavior.
Fields
| Edit this page View SourcelifetimeDistance
Controls exhaust trail length by limiting particle travel distance from emission point. Lower values create shorter trails, higher values longer trails.
Declaration
[Range(0, 1)]
[Tooltip("Maximum distance an exhaust particle can live from the point of emission.")]
public float lifetimeDistance
Field Value
| Type | Description |
|---|---|
| float |
Remarks
Trail length remains consistent regardless of aircraft speed by dynamically adjusting particle lifetime.
maxSizeMultiplier
Maximum particle size multiplier at full engine RPM (1-5 range). At idle, particles use base size. At max RPM, size is multiplied by this value.
Declaration
[Range(1, 5)]
[Tooltip("Particle start size is multiplied by this value based on engine RPM.")]
public float maxSizeMultiplier
Field Value
| Type | Description |
|---|---|
| float |
maxSpeedMultiplier
Maximum particle speed multiplier at full engine RPM (1-5 range). At idle, particles use base speed. At max RPM, speed is multiplied by this value.
Declaration
[Range(1, 5)]
[Tooltip("Particle start speed is multiplied by this value based on engine RPM.")]
public float maxSpeedMultiplier
Field Value
| Type | Description |
|---|---|
| float |
normalColor
Exhaust color at idle or low throttle (light/white smoke). Represents clean combustion with minimal soot production.
Declaration
[Tooltip("Normal particle start color. Used when there is no throttle - engine is under no load.")]
public Color normalColor
Field Value
| Type | Description |
|---|---|
| Color |
particleSystems
Particle systems representing engine exhaust. Multiple systems supported for complex exhaust setups.
Declaration
[Tooltip("List of exhaust particle systems.")]
public List<ParticleSystem> particleSystems
Field Value
| Type | Description |
|---|---|
| List<ParticleSystem> |
sootColor
Exhaust color at high throttle (dark/black smoke). Represents rich combustion with high soot production under load.
Declaration
[Tooltip("Soot particle start color. Used under heavy throttle - engine is under load.")]
public Color sootColor
Field Value
| Type | Description |
|---|---|
| Color |
sootIntensity
Controls how much the exhaust darkens under throttle load (0-1 range). At 0, exhaust remains light regardless of throttle. At 1, full soot color is used at full throttle.
Declaration
[Range(0, 1)]
[Tooltip("How much soot is emitted when throttle is pressed.")]
public float sootIntensity
Field Value
| Type | Description |
|---|---|
| float |
targetEngine
Engine whose state controls the exhaust particle behavior. Automatically assigned from the same GameObject.
Declaration
[Tooltip("Target engine of this script.")]
public AircraftEngineBase targetEngine
Field Value
| Type | Description |
|---|---|
| AircraftEngineBase |
Methods
| Edit this page View SourceAwake()
Declaration
public void Awake()
OnDisable()
Declaration
public void OnDisable()
OnEnable()
Declaration
public void OnEnable()
Update()
Declaration
public void Update()