Torque3D Documentation / _generateds / ParticleEmitterNode

ParticleEmitterNode

consoledoc.h

A particle emitter object that can be positioned in the world and dynamically enabled or disabled.

More...

Public Static Attributes

bool

Disables rendering of all instances of this type.

bool

Disables selection of all instances of this type.

Public Attributes

bool

Controls whether particles are emitted from this node.

Datablock to use when emitting particles.

float

Velocity to use when emitting particles (in the direction of the ParticleEmitterNode object's up (Z) axis).

Public Functions

void
setActive(bool active)

Turns the emitter on or off.

void

Assigns the datablock for this emitter node.

Detailed Description

A particle emitter object that can be positioned in the world and dynamically enabled or disabled.

datablock ParticleEmitterNodeData( SimpleEmitterNodeData )
{
   timeMultiple = 1.0;
};

%emitter = new ParticleEmitterNode()
{
   datablock = SimpleEmitterNodeData;
   active = true;
   emitter = FireEmitterData;
   velocity = 3.5;
};

// Dynamically change emitter datablock
%emitter.setEmitterDataBlock( DustEmitterData );
note:

To change the emitter field dynamically (after the ParticleEmitterNode object has been created) you must use the setEmitterDataBlock() method or the change will not be replicated to other clients in the game. Similarly, use the setActive() method instead of changing the active field directly. When changing velocity, you need to toggle setActive() on and off to force the state change to be transmitted to other clients.

Public Static Attributes

bool isRenderable 

Disables rendering of all instances of this type.

bool isSelectable 

Disables selection of all instances of this type.

Public Attributes

bool active 

Controls whether particles are emitted from this node.

ParticleEmitterData emitter 

Datablock to use when emitting particles.

float velocity 

Velocity to use when emitting particles (in the direction of the ParticleEmitterNode object's up (Z) axis).

Public Functions

setActive(bool active)

Turns the emitter on or off.

Parameters:

active

New emitter state

setEmitterDataBlock(ParticleEmitterData emitterDatablock)

Assigns the datablock for this emitter node.

Parameters:

emitterDatablock

ParticleEmitterData datablock to assign

// Assign a new emitter datablock
%emitter.setEmitterDatablock( %emitterDatablock );