Unity fireworks special effects with code
written in front
My friend passed his birthday, and I don’t know what gift to give, so I thought about using the knowledge I learned to make a special effect as a gift, hey.
Mainly refer to the video of this up , thanks
Effect
code address
core steps
The main thing is 1 main firework particle system with 3 sub-particle systems, these three small particle systems are trailing particle system, explosion particle system, and explosion astigmatism particle system (1) The main firework launch special effect cone emitter,
launching
upwards
Select Unity’s default particle texture as the particle material
. Turn on the trailing effect. Just choose a cone-shaped texture for
the trailing texture. It will look better if the trailing color is set to gradient
.
The center fires other small fireworks around, so the speed and size of the firework of the launcher ball launcher are
smaller than that of the main firework. The other settings are the same as the main firework. The trailing effect and the material of the firework are the same, so the color should be lighter. One
point: At this time, you need to set up a launcher in the main firework, and start the trailing streamer effect from birth
(3) The explosion effect of the main firework
is a special effect that is only produced when it explodes, so you need to select it in the sub-launcher of the main firework This special effect is also very simple when you die
, just use a ball launcher, the speed and size are smaller than the main firework,
and the emitted particles are fired in an instant
(4) The main firework explosion flash special effect
has an explosion flash when it explodes, to achieve It is also very simple, it is also generated when the main firework dies, only one is generated, there is no speed, no trailing effect
written in the back
You can add some text yourself, for example