Game Development Reference
In-Depth Information
To get an idea of where you are headed, first you will check out a variety of particle effects from
Unity's Sample Assets. For your first particle system you will start with a Sample Asset prefab and
modify it. You will move on to create a custom particle system from scratch, and ultimately combine
these systems into a complex particle effect. Finally, you will use scripting to incorporate the particle
effects and interaction with other game objects into the Obstacle Course scene.
To get straight to the fun stuff, in the Project panel go to Assets ➤ Sample Assets ➤ Sample Scenes
➤ Scenes, open up the Particles scene, and give a whirl. Explosions, fire, dust storms, fireworks,
water sprays and more all at your fingertips—awesome!
Okay, when you are ready to proceed, take a closer look at the dust storm and notice how the entire
area is involved. This is one simple particle system, with a distinct difference in the use of the size of
the emitter.
In the Hierarchy, select Particle Systems ➤ DustStorm. Next, in the Inspector expand the Shape
module of the Particle System component. Notice it is a box shape—a really big one with x and z
values of 100. This entire 100 × 100 box is the particle emitter, emitting the entire dust storm over the
surface area of the box so it appears to cover the scene when played.
You are going to build your particle effects in the Obstacle Course scene. Go ahead and reopen the
Obstacle Course scene in the editor and delete the default particle system.
In the Project panel, select the Assets ➤ Sample Assets ➤ Effects ➤ Particle Systems ➤ Prefabs
folder, drag a copy of the DustStorm particle system prefab into the scene, and rename it DustPuff.
The landing of the player character will be emphasized by a puff of dust. We will start with it since it
is the simplest.
Puff of Dust
The goal here is a sudden burst of dust to emphasize the force of the player's impact. With DustPuff
selected, turn your attention to the Particle System component in the Inspector (Figure 8-6 ).
Figure 8-6. DustPuff particle system component settings
 
Search WWH ::




Custom Search