Variable Center of Mass

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 fromIMassAffectorto aGameObjectthat is a child of the vehicle. - Tick
Use Mass Affectorson theVariableCenterOfMasscomponent. - Untick the
Use Default …for the properties that theMassAffectors should affect.