Mass From Volume

MassFromVolume is a helper script that calculates object's mass from volume of the mesh and the density.
- Volume of the mesh is calculated automatically.
- Can be used together with MassFromChildren to calculate mass of complex objects (objects having more than one child WaterObject).
Usage
- Attach the script to the object that has the mesh.
- The
Rigidbodyon the same object will have its mass set automatically. - Adjust the
Densityfield to control the mass calculation (mass = volume × density).