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 SourceGetMass()
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 |
GetTransform()
Returns transform of the mass affector.
Declaration
Transform GetTransform()
Returns
| Type | Description |
|---|---|
| Transform |
GetWorldCenterOfMass()
World position of this affector's center of mass. Used for weighted center of mass calculations.
Declaration
Vector3 GetWorldCenterOfMass()
Returns
| Type | Description |
|---|---|
| Vector3 |