![]() |
Pixelpart 1.8.2
Godot Plugin
|
Node that emits particles. More...
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< PixelpartAnimatedPropertyFloat3 > | get_direction () const |
Direction in which particles move when spawned, in degrees. | |
Ref< PixelpartAnimatedPropertyFloat > | get_spread () const |
How much the direction varies. | |
![]() | |
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< PixelpartAnimatedPropertyFloat3 > | get_position () const |
Position of the node. | |
Ref< PixelpartAnimatedPropertyFloat3 > | get_rotation () const |
Rotation of the node in degrees. | |
Ref< PixelpartAnimatedPropertyFloat3 > | get_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. | |
![]() | |
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. | |
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.
void godot::PixelpartParticleEmitter::add_shape_point | ( | Vector3 | point | ) |
Add a new point to the emitter shape.
Only applicable for emitter shape Path
.
point | Point to add |
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.
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.
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.
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.
int godot::PixelpartParticleEmitter::get_grid_order | ( | ) | const |
Get the grid order of grid distribution modes.
int godot::PixelpartParticleEmitter::get_grid_size_x | ( | ) | const |
Return the number of grid cells in X direction.
Only applicable for grid distribution modes.
int godot::PixelpartParticleEmitter::get_grid_size_y | ( | ) | const |
Return the number of grid cells in Y direction.
Only applicable for grid distribution modes.
int godot::PixelpartParticleEmitter::get_grid_size_z | ( | ) | const |
Return the number of grid cells in Z direction.
Only applicable for grid distribution modes.
int godot::PixelpartParticleEmitter::get_shape | ( | ) | const |
Return shape of the emitter area.
Vector3 godot::PixelpartParticleEmitter::get_shape_point | ( | int | index | ) | const |
Return the location of the point at the given index in the emitter shape.
index | Index of point |
int godot::PixelpartParticleEmitter::get_shape_point_count | ( | ) | const |
Return the number of points in the emitter shape.
Only applicable for emitter shape Path
.
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.
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
.
index | Index of point to remove |
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.
mode | Direction mode |
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.
mode | Distribution 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.
mode | Emission mode |
void godot::PixelpartParticleEmitter::set_grid_order | ( | int | mode | ) |
Set the grid order of grid distribution modes.
mode | Grid order |
void godot::PixelpartParticleEmitter::set_grid_size | ( | int | x, |
int | y, | ||
int | z ) |
Set the number of grid cells.
Only applicable for grid distribution modes.
x | Number of cells in X direction |
y | Number of cells in Y direction |
z | Number of cells in Z direction |
void godot::PixelpartParticleEmitter::set_shape | ( | int | type | ) |
Set shape of the emitter area.
type | Shape of the emitter area |
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
.
index | Index of point to change |
point | New location |
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.