Wind
Wind changes the relative airflow direction and speed used in aerodynamic calculations. Both Airfoil and AerodynamicDragObject respond to changing wind conditions during flight.
Wind uses a global singleton: only one wind generator can be present in the scene at a time. All aircraft and aerodynamic objects share its wind conditions.
Setup
- Attach a wind generator component to any GameObject in the scene (typically a global manager object)
- Only one wind generator should be active per scene
- Wind data is globally accessible to all
AirfoilandAerodynamicDragObjectcomponents - Wind works in conjunction with Atmosphere to simulate realistic environmental conditions
Wind Generators
Wind generators define how wind behaves in the scene. Use a built-in generator or write your own.
Random Wind Generator
See RandomWindGenerator for more information about the built-in random wind generator implementation.
Custom Wind Generators
Derive from NWH.Aerodynamics.Environment.WindGeneratorBase to implement custom wind patterns for specialized simulations or procedural wind systems.
Override GetWindVelocity() to return the air mass velocity in world-space m/s. Existing custom
generators may also override the public Awake() lifecycle hook; call base.Awake() so the global
instance is registered. Registration is repeated during OnEnable, which makes disabling and
re-enabling or pooling a generator safe. If a subclass overrides OnEnable or OnDisable, it must
call the corresponding base implementation.