NWH Aerodynamics
Search Results for

    Show / Hide Table of Contents

    Landing Gear

    Landing Gear Overview

    LandingGear component takes care of steering, brakes, rigging and animation.

    Basic Setup

    • Set up WheelColliders for each landing gear wheel as per Unity's guide.
    • Assign the created WheelCollider to the WheelCollider field. Assign the wheel transform (model representing the wheel) to the Wheel field.
    • Select the Position of the wheel (front, left, right, etc.)
    • Set the maxSteerAngle if the wheel is steerable. Leave at 0 if not.

    Rigging

    For rigging to work properly, a specific model setup is required with the following hierarchy:

    • SuspensionArmUpper
      • SuspensionArmLower
        • WheelCollider
        • WheelModel

    Assign the upper and lower suspension arm to the upperSuspensionArm and lowerSuspensionArm fields. The SuspensionArmLower should have rotation such that it's local Z axis points towards the pivot point of the SuspensionArmUpper:

    Proper rotation of the lower suspension arm to work with rigging.

    Objects that move and steer with the wheel such as fairing can be added to the Static Transform field.

    Front wheel fairing on Cirrus SR22 is a static transform (relative to the wheel) since it moves with the wheel keeping the constant offset.

    Animation

    Landing gear that can extend/retract can use animation to achieve this. This guide does not cover the steps to set up the animation, as this is a standard Unity process and is explained in the official Unity animation controller tutorial.

    The default state for animation is extended landing gear. The default animation (going forward) is extended => retracted. Extending the landing gear is simply the retracting animation played in reverse.

    Setup
    • Tick Retractable to indicate that the landing gear of the aircraft can retract.
    • Tick IsExtended if the initial state is extended landing gear.
    • Create new AnimationController.
    • Add Animator to the object LandingGear is attached to and assign the AnimationController to the Controller field.
    • Add Direction parameter to AnimationController and set the value to 1.
    • Create AnimationController with RetractLandingGear state:

    Example AnimationController setup.

    • Set the RetractLandingGear state speed to 1 and apply the Direction parameter as a speed multiplier.
    • Create new Animation and animate the landing gear as wanted. Initial state should be extended, final state should be retracted.
    • Assign the new Animation to the previously created AnimationController.
    • Assign the Animator to the Animator field.
    • Edit this page
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics