Class SmokeSystem
Aerobatic smoke trail system that emits colored smoke for airshow demonstrations. Automatically adjusts particle lifetime based on airspeed to maintain consistent trail length.
Namespace: NWH.Aerodynamics.AircraftController.Effects.SmokeSystem
Assembly: NWH.Aerodynamics.dll
Syntax
[Serializable]
[RequireComponent(typeof(ParticleSystem))]
public class SmokeSystem : AircraftMonoBehaviour
Remarks
Commonly used by aerobatic aircraft to create visible flight paths during performances. The system dynamically calculates particle lifetime to achieve the desired trail distance regardless of aircraft speed, with configurable minimum and maximum lifetime constraints to prevent performance issues at extreme speeds.
Fields
| Edit this page View SourcetrailDistance
Desired visual length of the smoke trail behind the aircraft (in meters). System automatically adjusts particle lifetime to maintain this distance regardless of airspeed.
Declaration
[Tooltip(" Target particle trail distance. Affects particle system start lifetime based on current airspeed and this value.")]
public float trailDistance
Field Value
| Type | Description |
|---|---|
| float |
Remarks
At high speeds, particles will have shorter lifetimes to prevent the trail from extending too far. At low speeds, lifetimes increase (up to trailMaxLifetime) to maintain visibility.
trailMaxLifetime
Maximum allowed particle lifetime (in seconds). Prevents excessively long-lived particles at very low speeds that could impact performance.
Declaration
[Range(1, 30)]
[Tooltip("Particle start lifetime upper cap.")]
public float trailMaxLifetime
Field Value
| Type | Description |
|---|---|
| float |
trailMinLifetime
Minimum allowed particle lifetime (in seconds). Ensures trail remains visible even at very high speeds.
Declaration
[Range(1, 30)]
[Tooltip("Particle start lifetime lower cap.")]
public float trailMinLifetime
Field Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceAwake()
Declaration
public override void Awake()
Overrides
| Edit this page View SourceFixedUpdate()
Declaration
public void FixedUpdate()