Class AerodynamicsModuleWrapper
MonoBehaviour wrapper for the Aerodynamics module.
Namespace: NWH.VehiclePhysics2.Modules.Aerodynamics
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
[DisallowMultipleComponent]
public class AerodynamicsModuleWrapper : ModuleWrapper
Remarks
Required component wrapper that allows the AerodynamicsModule to be attached to a GameObject with a VehicleController. The wrapper handles Unity's MonoBehaviour lifecycle and serialization while delegating aerodynamic calculations to the contained module.
Add this component to a vehicle GameObject through: - Unity Editor: Add Component > NWH > Vehicle Physics 2 > Modules > Aerodynamics Module - Script: gameObject.AddComponent<AerodynamicsModuleWrapper>()
The module can be accessed at runtime through the module field to: - Dynamically adjust drag coefficients - Add or modify downforce points - Toggle drag/downforce simulation - Query current aerodynamic forces
Fields
module
The aerodynamics module instance that handles drag and downforce calculations.
Declaration
public AerodynamicsModule module
Field Value
| Type | Description |
|---|---|
| AerodynamicsModule |
Methods
GetModule()
Gets the aerodynamics module instance.
Declaration
public override VehicleComponent GetModule()
Returns
| Type | Description |
|---|---|
| VehicleComponent | The AerodynamicsModule instance as a VehicleComponent. |
Overrides
SetModule(VehicleComponent)
Sets the aerodynamics module instance.
Declaration
public override void SetModule(VehicleComponent module)
Parameters
| Type | Name | Description |
|---|---|---|
| VehicleComponent | module | The VehicleComponent to set as the aerodynamics module. |