Lumberyard
User Guide (Version 1.16)

Wind Volume

This feature is in preview release and is subject to change.

You can use the Wind Volume component to create volumes that are affected by wind. Wind can affect vegetation, particles, and physical objects.

A Shape component defines the shape of the affected volume and is required on the same entity as the Wind Volume component. The supported shape types are Box Shape and Sphere Shape.


            Example Wind Volume component in Lumberyard.

You can define attributes of the wind volume such as its direction, speed, resistance, and density. For more information about these components, see Wind Volume Component Properties.


            Wind Volume component properties.

If you want the Wind Volume component to affect areas that have legacy vegetation, you must set its bending parameter to a value greater than 0.

Wind Volume Component Properties

The Wind Volume component has the following properties:

Property Description
Visible

Wind Volume component always appears in the viewport in Lumberyard Editor, even if the entity is not selected.

Falloff Inner

Affects the volume's wind speed. A value of 0 reduces the speed from the center towards the edge of the volume. A value of 1 or greater has no effect.

Speed Defines the wind's speed in meters per second. The Air Resistance property must be greater than 0 to affect physical objects.
Air Resistance Causes objects moving through the volume to slow down. A value of 0 has no effect.
Air Density Objects with lower density are buoyed up. Objects with high density will sink. A value of 0 has no effect.
Direction Defines the wind's direction in meters per second along the X, Y, and Z axes. To create an omnidirectional wind, specify 0 for X, Y, and Z.

EBus Request Bus Interface

Use the following request functions with the EBus interface to communicate with other components of your game. You can use this EBus to communicate to an entity with a Wind Volume component attached. The EBus is available at game time and editing and can be accessed from C++, Lua, and the Script Canvas editor.

For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) System.

Wind Volume Component Ebus Request Bus

Name Description Parameters Return Scriptable
GetAirDensity Returns the air density value. Void Float Yes
GetAirResistance Returns the air resistance value. Void Float Yes
GetFalloff Returns the falloff value. Void Float Yes
GetSpeed Returns the wind's speed. Void Float Yes
GetWindDirection Returns the direction that the wind is blowing. Void Vector3 Yes
SetAirDensity Sets the density of the volume, which causes lower density objects to be buoyed upward. Higher density objects will sink. A setting of 0 has no effect. Foat Void Yes
SetAirResistance Sets the air resistance. Objects moving through the volume slow down. Float Void Yes
SetFalloff Sets the falloff. Only affects the wind speed in the volume. A value of 0 reduces the speed from the center towards the edge of the volume. A value of 1 or greater has no effect. Float Void Yes
SetSpeed Sets the wind's speed. Float Void Yes
SetWindDirection Sets the direction that the wind is blowing. To create an omnidirectional wind, specify 0 for X, Y, and Z. Vector3 Void Yes

The following script uses the request bus interface.

Example

function Script:OnActivate() WindVolumeRequestBus.Event.SetWindDirection(self.entityId, Vector3(0, 0, 1)); end