Time for action – adding laser blasts
A muzzle flash generally consists of two parts. The first is a straight blast, forward along the barrel. The second is a fan around the base of the first.
- To begin, create a new
particleSystem object and rename it as
LineBlast; we will now proceed to make the first part.
- The flash does not last for very long, so find the Duration option in the Initial module and set it to 0.1.
- Next, we need to set the Start Lifetime option to 0.1 so the particles do not stay on screen for very long.
- The flash does not move away from the muzzle, so set the Start Speed option to 1, keeping the particles close.
- The particles need to be sized to correspond with the size of our ship's muzzle. Set the Start Size option to 0.2 to keep ...