New particle flag: PSYS_PART_CONFETTI_MASK
Fenix Eldritch
This is a refiling of BUG-233266
A new PSYS_PART_FLAGS mask value that when set, would cause particles to be drawn on 2D planes that aren't locked to facing the viewer's camera. Instead, each particle would be given a random rotation to spin on at a constant rate throughout its lifetime. As the name implies, the intent is to mimic pieces of confetti tumbling randomly through the air.
Ideally this would be compatible with most other existing particle parameters, perhaps with the exception of PSYS_PART_RIBBON_MASK. If the ribbon mask is set, it should probably override the confetti mask's effects.
When combined with PSYS_PART_FOLLOW_VELOCITY_MASK, it may be interesting to limit the spin to occur around the particle's local Z axis, while still having the particle's "top" orient itself in the direction of movement. If this is too performance intensive, then it might be best to also ignore this mask when the confetti mask is set.
Two additional PSYS_SRC_* parameters are optionally suggested to allow the user to specify a minimum and maximum speed at which the confetti particles will spin. I assume these would be ignored if PSYS_PART_CONFETTI_MASK is not set... unless others find it useful to be able to spin classic particles (since those always face the camera, they would in effect only be able to spin clockwise or counterclockwise). Setting spin speeds of 0 would be valid, causing the particles to not continuously spin, but sill have a random initial orientation at the time of their creation.
- PSYS_SRC_SPIN_SPEED_MIN: Specifies the minimum float value of a random range of values which is selected for each particle in a burst as its initial spin speed upon emission.
- PSYS_SRC_SPIN_SPEED_MAX: Specifies the maximum float value of a random range of values which is selected for each particle in a burst as its initial spin speed upon emission.
I feel this could be useful to content creators as it expands upon the visual effects possible with particles. Just as interesting new effects were created with ribbon particles, I think it would be valuable to bring some of that semi 3D feel to be used with the other existing patterns without the constraint of joining the particles together as ribbon does.
Log In