NWH Common
Search Results for

    Show / Hide Table of Contents

    Interface IMassAffector

    Interface for objects that contribute mass and affect vehicle center of mass calculations. Implemented by fuel tanks, cargo systems, and other variable mass components.

    Namespace: NWH.Common.CoM
    Assembly: NWH.Common.dll
    Syntax
    public interface IMassAffector
    Remarks

    Mass affectors allow dynamic vehicle physics by contributing their mass and position to the overall center of mass calculation. As fuel depletes or cargo loads change, the vehicle's handling characteristics update automatically.

    Methods

    | Edit this page View Source

    GetMass()

    Current mass of this affector in kilograms. Should return variable values for fuel tanks, cargo, etc.

    Declaration
    float GetMass()
    Returns
    Type Description
    float

    Mass in kg

    | Edit this page View Source

    GetTransform()

    Returns transform of the mass affector.

    Declaration
    Transform GetTransform()
    Returns
    Type Description
    Transform
    | Edit this page View Source

    GetWorldCenterOfMass()

    World position of this affector's center of mass. Used for weighted center of mass calculations.

    Declaration
    Vector3 GetWorldCenterOfMass()
    Returns
    Type Description
    Vector3
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics