Pixelpart 1.8.2
Godot Plugin
Loading...
Searching...
No Matches
godot::PixelpartParticleEmitter Class Reference

Node that emits particles. More...

Inheritance diagram for godot::PixelpartParticleEmitter:
[legend]

Public Member Functions

void set_shape (int type)
 Set shape of the emitter area.
 
int get_shape () const
 Return shape of the emitter area.
 
void add_shape_point (Vector3 point)
 Add a new point to the emitter shape.
 
void remove_shape_point (int index)
 Remove the point at the given index from the emitter shape.
 
void set_shape_point (int index, Vector3 point)
 Change the location of the point at the given index in the emitter shape.
 
Vector3 get_shape_point (int index) const
 Return the location of the point at the given index in the emitter shape.
 
int get_shape_point_count () const
 Return the number of points in the emitter shape.
 
void set_distribution (int mode)
 Set where particles are spawned inside the emitter area.
 
int get_distribution () const
 Return where particles are spawned inside the emitter area.
 
void set_grid_order (int mode)
 Set the grid order of grid distribution modes.
 
int get_grid_order () const
 Get the grid order of grid distribution modes.
 
void set_grid_size (int x, int y, int z)
 Set the number of grid cells.
 
int get_grid_size_x () const
 Return the number of grid cells in X direction.
 
int get_grid_size_y () const
 Return the number of grid cells in Y direction.
 
int get_grid_size_z () const
 Return the number of grid cells in Z direction.
 
void set_emission_mode (int mode)
 Set the emission mode.
 
int get_emission_mode () const
 Return the emission mode.
 
void set_direction_mode (int mode)
 Set the direction mode.
 
int get_direction_mode () const
 Get the direction mode.
 
Ref< PixelpartAnimatedPropertyFloat3get_direction () const
 Direction in which particles move when spawned, in degrees.
 
Ref< PixelpartAnimatedPropertyFloatget_spread () const
 How much the direction varies.
 
- Public Member Functions inherited from godot::PixelpartNode
int get_id () const
 ID of the node.
 
int get_parent_id () const
 ID of the node's parent.
 
String get_name () const
 Name of the node.
 
void set_lifetime_start (float time)
 Set time until the node becomes active.
 
void set_lifetime_duration (float time)
 Set how long the node stays active in seconds.
 
void set_repeat (bool value)
 Set whether the node repeats its behavior after its lifetime is over.
 
float get_lifetime_start () const
 Time in seconds until the node becomes active.
 
float get_lifetime_duration () const
 How long the node is active in seconds.
 
bool get_repeat () const
 Wether the node repeats its behavior after its lifetime is over.
 
bool is_active () const
 Return whether the node is active at the current point in time.
 
float get_local_time () const
 Return the time fraction the emitter has been active for, in range 0.0 (0%) to 1.0 (100%).
 
Ref< PixelpartAnimatedPropertyFloat3get_position () const
 Position of the node.
 
Ref< PixelpartAnimatedPropertyFloat3get_rotation () const
 Rotation of the node in degrees.
 
Ref< PixelpartAnimatedPropertyFloat3get_scale () const
 Size of the node.
 

Public Attributes

int shape
 Shape of the emitter area.
 
int distribution
 Where particles are spawned inside the emitter area.
 
int grid_order
 Grid order of grid distribution modes.
 
int emission_mode
 Emission mode to control when particles are created during the lifetime of the emitter.
 
int direction_mode
 Mode to control initial particle direction.
 
- Public Attributes inherited from godot::PixelpartNode
float lifetime_start
 Time in seconds until the node becomes active.
 
float lifetime_duration
 How long the node stays active in seconds.
 
bool repeat
 Wether the node repeats its behavior after its lifetime is over.
 

Detailed Description

Node that emits particles.

Particle emitters continuously spawn new particles of assigned particle types in a defined area. They also define in which direction particles move initially.

Member Function Documentation

◆ add_shape_point()

void godot::PixelpartParticleEmitter::add_shape_point ( Vector3 point)

Add a new point to the emitter shape.

Only applicable for emitter shape Path.

Parameters
pointPoint to add

◆ get_direction()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartParticleEmitter::get_direction ( ) const

Direction in which particles move when spawned, in degrees.

For 3D effects, the direction is composed of roll, yaw and pitch.

Returns
Direction property

◆ get_direction_mode()

int godot::PixelpartParticleEmitter::get_direction_mode ( ) const

Get the direction mode.

When a particle is created by the particle emitter, it decides in which direction to emit the particle based on the specified direction and the given direction mode.

Returns
Direction mode

◆ get_distribution()

int godot::PixelpartParticleEmitter::get_distribution ( ) const

Return where particles are spawned inside the emitter area.

When spawning particles inside the emitter shape, particle emitters can use different techniques to determine the exact points where particles are spawned.

Returns
Distribution mode

◆ get_emission_mode()

int godot::PixelpartParticleEmitter::get_emission_mode ( ) const

Return the emission mode.

The emission mode of particle emitters controls when particles are created during the lifetime of the emitter.

Returns
Emission mode

◆ get_grid_order()

int godot::PixelpartParticleEmitter::get_grid_order ( ) const

Get the grid order of grid distribution modes.

Returns
Grid order

◆ get_grid_size_x()

int godot::PixelpartParticleEmitter::get_grid_size_x ( ) const

Return the number of grid cells in X direction.

Only applicable for grid distribution modes.

Returns
Number of cells

◆ get_grid_size_y()

int godot::PixelpartParticleEmitter::get_grid_size_y ( ) const

Return the number of grid cells in Y direction.

Only applicable for grid distribution modes.

Returns
Number of cells

◆ get_grid_size_z()

int godot::PixelpartParticleEmitter::get_grid_size_z ( ) const

Return the number of grid cells in Z direction.

Only applicable for grid distribution modes.

Returns
Number of cells

◆ get_shape()

int godot::PixelpartParticleEmitter::get_shape ( ) const

Return shape of the emitter area.

Returns
Shape of the emitter area

◆ get_shape_point()

Vector3 godot::PixelpartParticleEmitter::get_shape_point ( int index) const

Return the location of the point at the given index in the emitter shape.

Parameters
indexIndex of point
Returns
Vector3 Location of point

◆ get_shape_point_count()

int godot::PixelpartParticleEmitter::get_shape_point_count ( ) const

Return the number of points in the emitter shape.

Only applicable for emitter shape Path.

Returns
Number of points

◆ get_spread()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartParticleEmitter::get_spread ( ) const

How much the direction varies.

A spread of 0° means that particles only move in the specified direction, while 360° leads to particles shooting off in all directions.

Returns
Spread property

◆ remove_shape_point()

void godot::PixelpartParticleEmitter::remove_shape_point ( int index)

Remove the point at the given index from the emitter shape.

Only applicable for emitter shape Path.

Parameters
indexIndex of point to remove

◆ set_direction_mode()

void godot::PixelpartParticleEmitter::set_direction_mode ( int mode)

Set the direction mode.

When a particle is created by the particle emitter, it decides in which direction to emit the particle based on the specified direction and the given direction mode.

Parameters
modeDirection mode

◆ set_distribution()

void godot::PixelpartParticleEmitter::set_distribution ( int mode)

Set where particles are spawned inside the emitter area.

When spawning particles inside the emitter shape, particle emitters can use different techniques to determine the exact points where particles are spawned.

Parameters
modeDistribution mode

◆ set_emission_mode()

void godot::PixelpartParticleEmitter::set_emission_mode ( int mode)

Set the emission mode.

The emission mode of particle emitters controls when particles are created during the lifetime of the emitter.

Parameters
modeEmission mode

◆ set_grid_order()

void godot::PixelpartParticleEmitter::set_grid_order ( int mode)

Set the grid order of grid distribution modes.

Parameters
modeGrid order

◆ set_grid_size()

void godot::PixelpartParticleEmitter::set_grid_size ( int x,
int y,
int z )

Set the number of grid cells.

Only applicable for grid distribution modes.

Parameters
xNumber of cells in X direction
yNumber of cells in Y direction
zNumber of cells in Z direction

◆ set_shape()

void godot::PixelpartParticleEmitter::set_shape ( int type)

Set shape of the emitter area.

Parameters
typeShape of the emitter area

◆ set_shape_point()

void godot::PixelpartParticleEmitter::set_shape_point ( int index,
Vector3 point )

Change the location of the point at the given index in the emitter shape.

Only applicable for emitter shape Path.

Parameters
indexIndex of point to change
pointNew location

Member Data Documentation

◆ direction_mode

int godot::PixelpartParticleEmitter::direction_mode

Mode to control initial particle direction.

When a particle is created by the particle emitter, it decides in which direction to emit the particle based on the specified direction and the given direction mode.


The documentation for this class was generated from the following files: