GenDistance
Generator. Generates particles based on the distance traveled by the emitter.
Each time the emitter moves a specified distance, a burst of particles is emitted. The generator interpolates the exact emission position along the emitter's path for smooth results.
This generator is ideal for trail effects where particle density should be proportional to movement speed.
Properties & inputs:
- Distance (input | property): Distance the emitter must travel to trigger one particle burst.
- Start Phase (property): Phase offset from 0 to 1. If 1, the first particle is emitted immediately. If 0, the emitter must travel the full distance first.
- Burst (property): Number of particles generated per emission event.
- Burst pos mode (property): Controls how the Burst Pos. output is spread across the particles of one burst. Normalized (default) runs the first particle to 0 and the last to 1 (index / (burst − 1)). Linear runs the first particle to 0 and the last to 1 − 1/burst (index / burst), so the value never quite reaches 1 — useful when Burst Pos. drives a looping or tiling gradient where the last particle should not land on the same value as the first.
Outputs:
- Burst Amount (float): Number of particles in the current burst.
- Burst Pos. (float): Position of a particle within the burst. The range depends on Burst pos mode: Normalized gives [0; 1] (last particle = 1), Linear gives [0; 1 − 1/burst] (last particle < 1).