Helper Scripts
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.
- Massfield can also be set manually.
- Can be used together withMassFromChildrento calculate mass of complex objects (objects having more than one childWaterObject).
Mass From Children
A helper script for determining mass of a Rigidbody from the children. It sums the masses of all the children that have WaterObjectMassHelper scripts attached. This eliminates the need for guessing the mass of the object.
Usage
- Attach the script to the parent object. That object has to contain theRigidbodycomponent.
- Make sure that at least one child hasWaterObjectMassHelperattached or the result will be 0 and ignored.
- Press Calculate Mass From Children. This will calculate and set theRigidbody's mass.


