NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Powertrain Component

    Base class for all powertrain components including EngineComponent, ClutchComponent, TransmissionComponent, DifferentialComponent, and WheelComponent.

    Overview

    PowertrainComponent implements a physically accurate solver based on torque and angular velocity calculations. Components are connected in a chain where each can output to one or more others, with EngineComponent as the power source and WheelComponent as the power sink.

    Common Properties

    Name

    Unique identifier for the component. Changing this resets all output connections for components that reference it.

    Inertia

    Angular inertia in kg·m². Each component's inertia contributes to overall system inertia, affecting how quickly the powertrain spins up or down.

    • Low (0.001-0.01): Responsive but easy to stall, may be unstable
    • Medium (0.02-0.2): Balanced, suitable for most vehicles (default: 0.02)
    • High (0.5+): Sluggish, difficult to stall, suitable for heavy machinery

    Must be greater than 0.0001 to prevent numerical instabilities.

    Output

    Specifies which PowertrainComponent receives torque from this component. Some components (like DifferentialComponent) have multiple outputs.

    Position

    Local space position relative to vehicle transform. Used for gizmo visualization and sound positioning.

    Common PowertrainComponent fields.

    Runtime Values

    During play mode, the following values are computed:

    • InputRPM / OutputRPM: Shaft speeds in revolutions per minute
    • inputTorque / outputTorque: Torque values in N·m
    • inputAngularVelocity / outputAngularVelocity: Angular velocities in rad/s
    • inputInertia / outputInertia: Accumulated inertia values in kg·m²

    Damage System

    The Damage property (0-1) affects component performance:

    • 0.0: Full efficiency
    • 0.0-0.3: Minor degradation
    • 0.3-0.7: Significant performance loss
    • 0.7-1.0: Severe damage, potential failure

    Solver Methods

    The powertrain solver operates in multiple passes:

    1. QueryAngularVelocity: Propagates angular velocity from wheels toward engine
    2. QueryInertia: Accumulates total system inertia
    3. ForwardStep: Propagates torque from engine toward wheels
    4. QueryReturnTorque: Collects counter-torque after wheel physics step

    Notes

    • WheelComponent inertia is determined by WheelController mass and radius settings
    • Components use name hashing for serialization and efficient lookup
    • Higher total inertia results in slower acceleration but better stall resistance
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics