Particle Systems | Unity Tutorial

Do want to make a game that has explosions, smoke, or flames? To add effects like these in Unity, you can create particle systems. If you are a beginner and want to learn how to build virtual reality games, check out our Unity 3D course

Each particle in a particle system is a simple mesh. The effect of all the combined particles creates a moving object.

To create a particle system, right-click in the Hierarchy, and select “Particle System”. “Particle System” will appear in the Hierarchy. In the Scene, Particle System is represented as a trio of arrows with white clouds emerging from its center.

Select Particle System. In the Inspector, change its position to 0 0 0. In the Scene, you will see white clouds floating up from the position 0 0 0.

Moving a Particle System

You can move Particle System like any other object. To have the particle system be part of Cube, drag “Particle System” onto “Cube” in the Hierarchy.

Particle System’s position in the Scene does not change. However, its Y Position value in the Inspector changes to “1.5”. This occurs because the particle system’s position is now local. It is relative to the parent, Cube.

Cube is in the position 0 -1.5 0. Particle System is in the position 0 1.5 0. To position the particle system in the center of the cube, change Particle System’s Y Position value to 0.

Notice that there is a Particle Effect window in the Scene. With this window, you can pause, stop, and restart the particles’ movement.

Properties of a Particle System

In the Inspector, Start Delay refers to how long after the game’s beginning the particles will begin appearing. Start Lifetime refers to how long the particles will appear on the screen before disappearing. Set Start Lifetime to 1.

The higher the Start Speed, the faster the particles will move. Set Start Speed to 3. Change Start Color to yellow.

To demonstrate the Gravity Modifier, let’s rotate the particle system. Select the Rotating tool. Drag the green circle until Particle System’s Rotation values are approximately -30, -90, and -90.

Change the value of the Gravity Modifier to 1. You can increase the speed to 6. In the Scene, the particles will appear to be jumping out of the cube and falling to the floor.

Move Particle System around the Scene. No matter how quickly you move the game object around the screen, all the particles will move will your cursor.

However, if you change Simulation Space to “World” and move the game object, not all the particles will follow the object. The particles that have already fallen out of the object will continue falling in their trajectory.

In the Emission component, you can change the rate of particles that appear from the game object. Set Rate to 8. In the Shape component, you can form the shape that contains the particles. For instance, in the following screenshot, the particles are contained in a cone that has an angle of 6.1.

To learn more about particle systems, check out our Unity 3D course, where you build 30 virtual reality games!