NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Variable Center of Mass

    VariableCenterOfMass inspector

    Note: VariableCenterOfMass is part of NWH Common. For comprehensive documentation including examples, integration with NWH assets, and best practices, see NWH Common - Variable Center of Mass.

    Note: Shared script across NWH vehicle assets.

    Important: In Unity 6, center of mass and inertia can be adjusted directly in Rigidbody inspector.

    Adjusts center of mass and inertia tensor through inspector. Supports dynamic mass distribution via MassAffector components (fuel tanks, cargo, passengers) without requiring additional Rigidbodies.

    Usage
    • Attach the MassAffector (or any script inheriting from IMassAffector to a GameObject that is a child of the vehicle.
    • Tick Use Mass Affectors on the VariableCenterOfMass component.
    • Untick the Use Default … for the properties that the MassAffectors should affect.
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics