NWH Wheel Controller 3D
Search Results for

    Show / Hide Table of Contents

    Car Controller

    A simple demo vehicle controller showcasing WheelController3D integration. This barebones controller is intended for standalone use only - for a complete vehicle physics solution with advanced features, use NWH Vehicle Physics instead.

    Overview

    The CarController component provides basic arcade-style car control: steering, acceleration, braking and handbrake. It accepts any wheel inheriting from the WheelUAPI interface, which is currently:

    • WheelController - The main wheel physics component
    • WheelColliderUAPI - An extension to the Unity WheelCollider that provides WheelUAPI bindings for compatibility

    Setup

    For step-by-step setup instructions including how to configure the CarController, see:

    • Quick Start Guide - Step 7: Add Vehicle Control (Standalone Only)
    • Wheel Controller Setup - Car Controller section

    Configuration

    The CarController is configured per-wheel through the _Wheel struct properties:

    • Steer - Enable steering for this wheel (typically front wheels)
    • Power - Enable motor torque for this wheel (front for FWD, rear for RWD, all for AWD)
    • Handbrake - Enable handbrake application for this wheel (typically rear wheels)

    Behavior

    The CarController provides the following features:

    • Steering - Dynamic steering angle based on vehicle speed (ranges between maxSteeringAngle and minSteeringAngle)
    • Acceleration - Motor torque applied to powered wheels up to maxMotorTorque
    • Braking - Brake torque applied to wheels up to maxBrakeTorque
    • Handbrake - High brake torque applied to handbrake-enabled wheels

    Input

    The CarController uses Unity's Input System package for input handling. The input bindings are defined in the CarInputActions asset located in Runtime/Input/.

    Default Controls:

    Action Keyboard Gamepad
    Steering A/D Left Stick Horizontal
    Throttle/Brake W/S Left Stick Vertical
    Handbrake Space South Button (A/X)

    To customize bindings, modify the CarInputActions.inputactions file in the package.

    Note: Ensure Project Settings > Player > Active Input Handling is set to Input System Package (New) or Both.

    Important Notes

    • This is a simple demo controller and is not a replacement for a complete vehicle physics solution
    • The controller uses Unity's new Input System package (not the legacy Input Manager)
    • Wheels are found automatically but the Steer, Power, and Handbrake settings must be configured per wheel
    • For full vehicle physics including transmission, traction control, and advanced suspension tuning, use NWH Vehicle Physics
    • The CarController inherits from the Vehicle class for compatibility with NWH's VehicleChanger and other vehicle management systems
    • Edit this page
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics