To create the effect of wind on your Terrain and Particle Systems, you can add one or more GameObjects with Wind Zone components. Trees within a wind zone bend in a realistic animated fashion, and the wind itself moves in pulses to create natural patterns of movement among the trees.
To create a Wind Zone GameObject directly, go to Unity’s top menu and then go to GameObject > 3D Object > Wind Zone. You can add the Wind Zone component to any suitable GameObject already in the Scene (menu: Component > Miscellaneous > Wind Zone). The Inspector for the Wind Zone has a number of settings to control its behavior.
You can set the Mode to Directional or Spherical.
The Main property determines the overall strength of the wind, and you can use Turbulence to give these some random variation.
The wind blows over the trees in pulses to create a more natural effect. You can control the strength of the pulses with Pulse Magnitude, and the time interval between them with Pulse Frequency.
Свойства
Свойство: | Функция: |
---|---|
Mode | |
Spherical | Зона ветра действует только в рамках указанного радиуса и ветер дует из центра к поверхности сферы. |
Directional | Зона ветра действует на всю сцену в определённом направлении. |
Radius | Radius of the Spherical Wind Zone (only active if the mode is set to Spherical). |
Main | The primary force applied to all objects affected by the Wind Zone. |
Turbulence | The value represents the noise of the wind. A greater value creates higher variation in wind direction. |
Pulse Magnitude | Defines the strength multiplier of the wind pulses. |
Pulse Frequency | Defines the length and frequency of the wind pulses. |
The main use of wind is to animate trees, but it can also affect particles in a Particle System if that Particle System uses the External Forces module module. See the Particle System reference page for further details.