ForestWindEmitter

Object responsible for simulating wind in a level.

Inherit:
SceneObject

Description

When placed in the level, a ForestWindEmitter will cause tree branches to bend and sway, leaves to flutter, and create vertical bending on the tree’s trunk.

Example:

// The following is a full declaration of a wind emitternewForestWindEmitter()
{
   position = "497.739 765.821 102.395";
   windEnabled = "1";
   radialEmitter = "1";
   strength = "1";
   radius = "3";
   gustStrength = "0.5";
   gustFrequency = "1";
   gustYawAngle = "10";
   gustYawFrequency = "4";
   gustWobbleStrength = "2";
   turbulenceStrength = "1";
   turbulenceFrequency = "2";
   hasMount = "0";
   scale = "3 3 3";
   canSave = "1";
   canSaveDynamicFields = "1";
   rotation = "1 0 0 0";
};

Methods

void ForestWindEmitter::attachToObject(int objectID)

Mounts the wind emitter to another scene object.

Parameters:objectID – Unique ID of the object wind emitter should attach to

Example:

// Wind emitter previously created and named %windEmitter// Going to attach it to the player, making him a walking wind storm
%windEmitter.attachToObject(%player);

Fields

float ForestWindEmitter::gustFrequency

The frequency of gusting in seconds.

float ForestWindEmitter::gustStrength

The maximum strength of a gust.

float ForestWindEmitter::gustWobbleStrength

The amount of random wobble added to gust and turbulence vectors.

float ForestWindEmitter::gustYawAngle

The amount of degrees the wind direction can drift (both positive and negative).

float ForestWindEmitter::gustYawFrequency

The frequency of wind yaw drift, in seconds.

bool ForestWindEmitter::hasMount

Determines if the emitter is mounted to another object.

bool ForestWindEmitter::radialEmitter

Determines if the emitter is a global direction or local radial emitter.

float ForestWindEmitter::radius

The radius of the emitter for local radial emitters.

float ForestWindEmitter::strength

The strength of the wind force.

float ForestWindEmitter::turbulenceFrequency

The frequency of gust turbulence, in seconds.

float ForestWindEmitter::turbulenceStrength

The strength of gust turbulence.

bool ForestWindEmitter::windEnabled

Determines if the emitter will be counted in wind calculations.