Class AerodynamicDragObject
Simulates aerodynamic drag on non-lifting bodies such as fuselages, landing gear, and external stores. Calculates direction-dependent drag based on projected area and coefficient of drag for each face.
Namespace: NWH.Aerodynamics.Airfoils
Assembly: NWH.Aerodynamics.dll
Syntax
[Serializable]
public class AerodynamicDragObject : MonoBehaviour
Remarks
Unlike airfoils which generate lift, this component only produces drag forces. Drag is calculated separately for each of the six box faces (front, rear, left, right, top, bottom) and combined based on the flow direction. Useful for aircraft fuselages, wheels, antennas, and other non-lifting components that contribute to total aircraft drag.
Fields
| Edit this page View SourcebottomDragCoeff
Drag coefficient for the bottom face (local -Y direction). Typical values: 0.3-0.5 for smooth surfaces, 1.0+ for rough/complex surfaces.
Declaration
[Tooltip("Bottom side drag coefficient of the drag object.")]
public float bottomDragCoeff
Field Value
| Type | Description |
|---|---|
| float |
center
Relative center of the drag object.
Declaration
[Tooltip("Relative center of the drag object.")]
public Vector3 center
Field Value
| Type | Description |
|---|---|
| Vector3 |
dimensions
Bounding box dimensions in meters (width, height, length). Used to calculate projected frontal area for each face. X = width (left-right), Y = height (up-down), Z = length (front-back).
Declaration
[Tooltip("Drag object dimensions in [m].")]
public Vector3 dimensions
Field Value
| Type | Description |
|---|---|
| Vector3 |
direction
Relative forward direction of the drag object.
Declaration
[Tooltip("Relative forward direction of the drag object.")]
public Vector3 direction
Field Value
| Type | Description |
|---|---|
| Vector3 |
dragCoefficient
Global multiplier applied to all face drag coefficients. Values below 1.0 reduce total drag, above 1.0 increase total drag. Default 1.0.
Declaration
[Tooltip(" Overall drag coefficient. Multiplies individual drag coefficients for front, rear, side, top, etc.")]
public float dragCoefficient
Field Value
| Type | Description |
|---|---|
| float |
frontDragCoeff
Drag coefficient for the front face (local +Z direction). Typical values: 0.2-0.3 for streamlined shapes, 0.5-0.8 for blunt shapes, 1.0+ for flat plates.
Declaration
[Tooltip("Front side drag coefficient of the drag object.")]
public float frontDragCoeff
Field Value
| Type | Description |
|---|---|
| float |
rearDragCoeff
Drag coefficient for the rear face (local -Z direction). Typically slightly higher than front due to flow separation. Values: 0.25-0.4 for tapered shapes.
Declaration
[Tooltip("Rear side drag coefficient of the drag object.")]
public float rearDragCoeff
Field Value
| Type | Description |
|---|---|
| float |
sideDragCoeff
Drag coefficient for left and right faces (local ±X direction). Typical values: 0.4-0.6 for smooth cylinders, 1.0+ for complex shapes with protrusions.
Declaration
[Tooltip("Side (left or right) drag coefficient of the drag object.")]
public float sideDragCoeff
Field Value
| Type | Description |
|---|---|
| float |
topDragCoeff
Drag coefficient for the top face (local +Y direction). Typical values: 0.3-0.5 for smooth surfaces, 1.0+ for rough/complex surfaces.
Declaration
[Tooltip("Top side drag coefficient of the drag object.")]
public float topDragCoeff
Field Value
| Type | Description |
|---|---|
| float |
Properties
| Edit this page View SourceCenter
Center point of the drag object in world space. Forces are applied near this point.
Declaration
public Vector3 Center { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Direction
Forward direction of the drag object in world space.
Declaration
public Vector3 Direction { get; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Methods
| Edit this page View SourceFixedUpdate()
Declaration
public void FixedUpdate()
Initialize()
Initializes references to the parent Rigidbody and optional Atmosphere component.
Declaration
public void Initialize()
OnDrawGizmosSelected()
Declaration
public void OnDrawGizmosSelected()