1. 程式人生 > >Unity 自帶風場元件

Unity 自帶風場元件

今天把viking village拿出來看了下,畢竟是3年前的工程,效果確實趕不上現在的《死亡之書》等2018版本的工程,有幾個外掛平時沒有用到,學習了下

風場元件:Wind Zone



文件中這麼描述:

Tree - Wind Zones

Wind Zones add realism to the trees you create by making them wave their branches and leaves as if blown by the wind.

To the left a Spherical Wind Zone, to the right a Directional Wind zone.To the left a Spherical Wind Zone, to the right a Directional Wind zone.

Properties

Property:Function:
Mode
        SphericalWind zone only has an effect inside the radius, and has a falloff from the center towards the edge.
        DirectionalWind zone affects the entire scene in one direction.
RadiusRadius of the Spherical Wind Zone (only active if the mode is set to Spherical).
MainThe primary wind force. Produces a softly changing wind pressure.
TurbulenceThe turbulence wind force. Produces a rapidly changing wind pressure.
Pulse MagnitudeDefines how much the wind changes over time.
Pulse FrequencyDefines the frequency of the wind changes.

Details

Wind Zones are used only by the tree creator for animating leaves and branches. This can help your scenes appear more natural and allows forces (such as explosions) within the game to look like they are interacting with the trees. For more information about how a tree works, just visit the 

tree class page.

Using Wind Zones in Unity

Using Wind Zones in Unity is really simple. First of all, to create a new wind zone just click on Game Object > 3D Object > Wind Zone.

Place the wind zone (depending on the type) near the trees created with the tree creator and watch it interact with your trees!.

Note: If the wind zone is Spherical you should place it so that the trees you want to blow are within the sphere’s radius. If the wind zone is directional it doesn’t matter where in the scene you place it.