Class 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.
Namespace: NWH.DWP2.WaterObjects
Assembly: NWH.DWP2.dll
Syntax
[CreateAssetMenu(fileName = "WaterObjectMaterial", menuName = "Dynamic Water Physics 2/Water Object Material", order = 0)]
public class WaterObjectMaterial : ScriptableObject
Fields
| Edit this page View Sourcedensity
Material density in kg/m³. Used with mesh volume to calculate realistic object mass. Examples: Wood ~600, Ice ~920, Aluminum ~2700, Steel ~7850.
Declaration
public float density
Field Value
| Type | Description |
|---|---|
| float |