NWH Aerodynamics
Search Results for

    Show / Hide Table of Contents

    Control Surfaces

    Control surface ''Airfoil'' (red) attached to a flight surface ''Airfoil'' (blue). This is the recommended configuration for control surfaces in NWH Aerodynamics.

    ControlSurfaces are components that are attached to Airfoils to make them into elevators, rudders, flaps, etc. While they can be used as a standalone Airfoil, they are usually part of another Airfoil, e.g. a wing.
    They require AircraftController and AircraftInputManager to be attached to one of the parent objects.

    Before setting up a control surface, read the Airfoil page.

    Setup

    This example sets up an aileron attached to a wing.

    A wing ''Airfoil'' that has previously been set up.

    • The wing Airfoil should be set up as in the image above, as per the Airfoil setup guide. Ideally, the wing should also cover the control surfaces (in this case an aileron and a flap).
    • Select the aileron object:

    Aileron GameObject highlighted in the scene view.

    • Attach Airfoil component and tick Is Control Surface in the Airfoil inspector. Airfoil gizmo will turn red.
    • Adjust the Airfoil if required.
    • Attach one of the control surface components to the aileron, in this case AileronControlSurface, and adjust its settings if needed. The control surface component must be on the same GameObject as its Airfoil; it logs an error and disables itself otherwise.
    • Select the wing Airfoil and at the bottom of its inspector add the AileronControlSurface from the previous step. This will tell the wing that the aileron belongs to it.
    • The parent airfoil controls slicing of its control surfaces. Slicing the wing also slices the aileron airfoil along the same lines. The slices should roughly match so they can be paired automatically for realistic control surface simulation. A yellow line gizmo marks each pair between the wing airfoil and control surface:

    Wing ''Airfoil'' section paired to a control surface ''Airfoil'' section.

    • Adjust the slicing points on the wing (red arrow handle) to match the edges of the control surface, an example:

    An example of a slicing point (red dashed line and a red arrow handle) that is not aligned to an edge of the aileron control surface. The aileron and wing sections still got paired but this is not ideal.

    Properly adjusted slicing point. Note that the edge of the control surface (aileron) and the slicing point match perfectly. There is in-built snapping that helps with this.

    • With the AircraftController set up, the aileron will work when you press Play.
    Control surface `Airfoil`s that are not attached to a fixed `Airfoil` need to have `isControlSurface` unticked as they act as standalone airfoils that can simply be rotated, instead of being a part of a wing.
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics