NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Engine Component

    Engine inspector.

    The engine acts as a source of power/torque and updates the components attached to it recursively with the generated torque.

    Note: When using the Electric engine, consider setting the output to the Transmission, bypassing the Clutch, as it is not needed.

    Inertia

    Higher engine inertia results in an engine that is harder to stall. The such engine will also take longer to spin up. Typical values:

    • Sports car: 0.2
    • Average car: 0.3-0.5
    • Semi truck: 1-1.5
    Power Curve

    The power curve represents engine power across its RPM range. X and Y values are normalized where X (0 to 1) represents RPM as a percentage of Rev Limiter RPM and Y (0 to 1) represents power as a percentage of Max Power.

    Note: Power and torque curves show the exact same data since the power is a function of torque and RPM, so knowing two of the three is enough. Since power curves are usually easier to find, NVP2 uses a power curve instead of a torque curve.

    Similar power output, different power curves.

    Idle Control

    The Idle Control system tries to keep RPM at the idleRPM value when there is no user input. This is done through throttle modulation so it is still possible to stall the engine if stallingEnabled = true.

    Starter

    Starter spins up the engine to try and reach the RPM at which the power generated by the engine is enough for it to spin by itself and overcome the losses. The amount of torque needed is automatically calculated based on the engine inertia, Power Curve, and the Start Duration value.
    When Flying Start is enabled, the engine spins up instantly without running the starter. This is to give an illusion of the engine already having been started when the vehicle is woken up.

    Rev Limiter

    Cuts throttle to the engine when RPM reaches Rev Limiter RPM for a duration of Rev Limiter Cutoff Duration.

    Forced Induction

    See Engine Component - Forced Induction for detailed configuration options.

    Power Modifiers

    Power modifiers can be used through scripting to modify the power of the engine. These are functions that return a float which denotes an engine power coefficient. Example:

    public float AddBoost()
    {
       if(boostIsActive)
       { 
           return 1.5f; // Increases power for 50%.
       }
    }
    ...
    myVehicleController.powertrain.engine.powerModifiers.Add(AddBoost);
    

    This is a fictional example. A concrete example can be found inside the TCS Module which uses this mechanic to limit power when there is wheel spin.

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