Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class 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.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    WaterParticleSystem
    Namespace: NWH.DWP2.WaterObjects
    Assembly: NWH.DWP2.dll
    Syntax
    [RequireComponent(typeof(ParticleSystem))]
    public class WaterParticleSystem : MonoBehaviour

    Fields

    | Edit this page View Source

    ReferenceWaterObject

    WaterObject to read simulation data from. Will auto-detect from parent if not assigned.

    Declaration
    public WaterObject ReferenceWaterObject
    Field Value
    Type Description
    WaterObject
    | Edit this page View Source

    emit

    Should the particle system emit?

    Declaration
    [Tooltip("Should the particle system emit?")]
    public bool emit
    Field Value
    Type Description
    bool
    | Edit this page View Source

    emitPerCycle

    How many particles should be emitted each 'emitTimeInterval' seconds.

    Declaration
    [Tooltip("How many particles should be emitted each 'emitTimeInterval' seconds.")]
    [Range(0, 20)]
    public int emitPerCycle
    Field Value
    Type Description
    int
    | Edit this page View Source

    emitTimeInterval

    Determines how often the particles will be emitted.

    Declaration
    [Tooltip("Determines how often the particles will be emitted.")]
    [Range(0, 0.1)]
    public float emitTimeInterval
    Field Value
    Type Description
    float
    | Edit this page View Source

    initialAlphaModifier

    Multiplies initial alpha by this value. Alpha cannot be higher than maxInitialAlpha.

    Declaration
    [Tooltip("Multiplies initial alpha by this value. Alpha cannot be higher than maxInitialAlpha.")]
    [Range(0, 10)]
    public float initialAlphaModifier
    Field Value
    Type Description
    float
    | Edit this page View Source

    initialVelocityModifier

    Determines how much velocity of the object will affect initial particle speed.

    Declaration
    [Tooltip("Determines how much velocity of the object will affect initial particle speed.")]
    [Range(0, 5)]
    public float initialVelocityModifier
    Field Value
    Type Description
    float
    | Edit this page View Source

    maxInitialAlpha

    Limit initial alpha to this value.

    Declaration
    [Tooltip("Limit initial alpha to this value.")]
    [Range(0, 1)]
    public float maxInitialAlpha
    Field Value
    Type Description
    float
    | Edit this page View Source

    positionExtrapolationFrames

    Number of frames ahead to predict particle emission position. Higher values spawn particles ahead of the object for better visual continuity.

    Declaration
    [Tooltip("Script will try to predict where the object will be in the next n frames.")]
    public int positionExtrapolationFrames
    Field Value
    Type Description
    int
    | Edit this page View Source

    renderQueue

    Render queue of the particle material.

    Declaration
    [Tooltip("Render queue of the particle material.")]
    public int renderQueue
    Field Value
    Type Description
    int
    | Edit this page View Source

    sleepThresholdVelocity

    Velocity object has to have to emit particles.

    Declaration
    [FormerlySerializedAs("sleepTresholdVelocity")]
    [Tooltip("Velocity object has to have to emit particles.")]
    [Range(0.1, 5)]
    public float sleepThresholdVelocity
    Field Value
    Type Description
    float
    | Edit this page View Source

    startSize

    Initial size of the particle.

    Declaration
    [Tooltip("Initial size of the particle.")]
    [Range(0, 64)]
    public float startSize
    Field Value
    Type Description
    float
    | Edit this page View Source

    surfaceElevation

    Elevation above water at which the particles will spawn. Used to avoid clipping.

    Declaration
    [Tooltip("Elevation above water at which the particles will spawn. Used to avoid clipping.")]
    [Range(0, 0.1)]
    public float surfaceElevation
    Field Value
    Type Description
    float
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics