NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Namespace NWH.VehiclePhysics2.Modules.CruiseControl

    Classes

    CruiseControlModule

    Cruise control module that automatically maintains a target vehicle speed. Uses a PID (Proportional-Integral-Derivative) controller for smooth speed regulation.

    Features:

    • Automatic speed maintenance using throttle and optionally brakes
    • PID-based control for smooth acceleration and deceleration
    • Configurable activation/deactivation behavior
    • Safety features including brake override

    The module works only in forward motion and automatically disengages when:

    • The vehicle stops or goes in reverse
    • The brake is pressed (if configured)
    • The module is manually deactivated

    Ideal for highway driving simulation, long-distance travel, or reducing player fatigue in games with extensive driving segments.

    CruiseControlModuleWrapper

    MonoBehaviour wrapper for the CruiseControl module. This wrapper allows the CruiseControlModule to be attached as a component to a VehicleController GameObject. The module provides automatic speed control functionality using a PID controller.

    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics