Dynamic Water Physics 2 Documentation
Action disabled: source
Docs ยป HelperScripts

Helper Scripts

Mass From Volume

MassFromVolume inspector.

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.
  • Mass field can also be set manually.
  • Can be used together with MassFromChildren to calculate mass of complex objects (objects having more than one child WaterObject).
2023/05/14 16:42

Mass From Children

MassFromChildren inspector.

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 the Rigidbody component.
  • Make sure that at least one child has WaterObjectMassHelper attached or the result will be 0 and ignored.
  • Press Calculate Mass From Children. This will calculate and set the Rigidbody's mass.
2023/05/14 16:42
Previous Next

Dynamic Water Physics 2 Documentation

Table of Contents

Table of Contents

  • Helper Scripts
      • Mass From Volume
      • Mass From Children
  • About
  • Quick Start
  • WaterObject
  • WaterParticleSystem
  • Input
  • AdvancedShipController
  • SailController
  • Submarine
  • Supported Water Assets
  • NWH Common Scripts
  • Helper Scripts
  • Demos
  • Upgrade Notes
  • Changelog
  • Support