Using wind emitters to create motion for foliage and particle systems
Unity supports wind emitters with which we can create realistic effects for foliage and particles. Using them is really simple.
Getting ready
To follow this recipe, you need to have a particle system and a tree created with Unity's built—in Tree Creator
. You can open the provided example project and go to the Chapter 07 Special effects\Recipe 06 Using wind emitters to create motion for foliage and particle systems
directory. In the Example.unity
scene there, you can find a tree and a simple particle system (falling leaves). Play the game to see the tree and particles moving with the wind.
Tree with a falling leaves particle system. Both animated with a WindZone
How to do it...
To use Unity's wind, follow these steps:
- Place the tree and the particle system in the scene.
- Create a new
WindZone
. To do so, go to theGameObject
|3D Object
|Wind Zone
option. - The tree will move when you play the game, but the particle system needs to...