Namespace NWH.DWP2.WaterObjects
Classes
MassFromChildren
Calculates mass of a Rigidbody from the children that have MassFromVolume script attached.
MassFromVolume
Script to calculate mass from mesh volume and material density. Removes need for guessing mass and ensures that all objects of same density are submerged equally.
MeshUtility
Utility class for mesh processing operations used by WaterObject. Handles mesh simplification, convexification, vertex welding, and volume calculations.
SerializedMesh
Serializable representation of a mesh. Used to store simulation mesh data without keeping mesh references in game files.
WaterObject
Core component for mesh-based buoyancy simulation. Calculates buoyancy and hydrodynamic forces by slicing mesh triangles at the water surface. Requires a MeshFilter with a valid mesh and a Rigidbody to apply forces to. Use WaterObjectWizard for one-click setup or manually configure the simulation mesh.
WaterObjectMaterial
ScriptableObject defining material properties for mass calculation. Contains density value used by MassFromVolume to calculate object mass. Create via Assets > Create > Dynamic Water Physics 2 > Water Object Material.
WaterObjectWizard
Configuration for the WaterObject setup wizard. Used by the editor to automate WaterObject component setup.
WaterParticleSystem
Generates water spray and splash particles based on WaterObject simulation data. Emits particles at the waterline where triangles intersect the water surface. Particle emission is controlled by object velocity and triangle forces. Requires a ParticleSystem component.