.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Particles: Particles ========= **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Particle system 3D Node Member Functions ---------------- +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_amount` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_color_phase_color` **(** :ref:`int` phase **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_color_phase_pos` **(** :ref:`int` phase **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_color_phases` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_emission_base_velocity` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_emission_half_extents` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3Array` | :ref:`get_emission_points` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_emit_timeout` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_gravity_normal` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Material` | :ref:`get_material` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_randomness` **(** :ref:`int` variable **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_variable` **(** :ref:`int` variable **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`get_visibility_aabb` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_height_from_velocity` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_emitting` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_using_local_coordinates` **(** **)** const | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_amount` **(** :ref:`int` amount **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color_phase_color` **(** :ref:`int` phase, :ref:`Color` color **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color_phase_pos` **(** :ref:`int` phase, :ref:`float` pos **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color_phases` **(** :ref:`int` count **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emission_base_velocity` **(** :ref:`Vector3` base_velocity **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emission_half_extents` **(** :ref:`Vector3` half_extents **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emission_points` **(** :ref:`Vector3Array` points **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emit_timeout` **(** :ref:`float` timeout **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emitting` **(** :ref:`bool` enabled **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_gravity_normal` **(** :ref:`Vector3` normal **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_height_from_velocity` **(** :ref:`bool` enable **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_material` **(** :ref:`Material` material **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_randomness` **(** :ref:`int` variable, :ref:`float` randomness **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_use_local_coordinates` **(** :ref:`bool` enable **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_variable` **(** :ref:`int` variable, :ref:`float` value **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_visibility_aabb` **(** :ref:`AABB` aabb **)** | +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- - **VAR_LIFETIME** = **0** - **VAR_SPREAD** = **1** - **VAR_GRAVITY** = **2** - **VAR_LINEAR_VELOCITY** = **3** - **VAR_ANGULAR_VELOCITY** = **4** - **VAR_LINEAR_ACCELERATION** = **5** - **VAR_DRAG** = **6** - **VAR_TANGENTIAL_ACCELERATION** = **7** - **VAR_INITIAL_SIZE** = **9** - **VAR_FINAL_SIZE** = **10** - **VAR_INITIAL_ANGLE** = **11** - **VAR_HEIGHT** = **12** - **VAR_HEIGHT_SPEED_SCALE** = **13** - **VAR_MAX** = **14** Description ----------- Particles is a particle system 3D :ref:`Node` that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility AABB (although helpers to create one automatically exist). Member Function Description --------------------------- .. _class_Particles_get_amount: - :ref:`int` **get_amount** **(** **)** const Return the total amount of particles in the system. .. _class_Particles_get_color_phase_color: - :ref:`Color` **get_color_phase_color** **(** :ref:`int` phase **)** const Return the color of a color phase. .. _class_Particles_get_color_phase_pos: - :ref:`float` **get_color_phase_pos** **(** :ref:`int` phase **)** const Return the position of a color phase (0 to 1). .. _class_Particles_get_color_phases: - :ref:`int` **get_color_phases** **(** **)** const .. _class_Particles_get_emission_base_velocity: - :ref:`Vector3` **get_emission_base_velocity** **(** **)** const .. _class_Particles_get_emission_half_extents: - :ref:`Vector3` **get_emission_half_extents** **(** **)** const Return the half extents for the emission box. .. _class_Particles_get_emission_points: - :ref:`Vector3Array` **get_emission_points** **(** **)** const .. _class_Particles_get_emit_timeout: - :ref:`float` **get_emit_timeout** **(** **)** const .. _class_Particles_get_gravity_normal: - :ref:`Vector3` **get_gravity_normal** **(** **)** const Return the normal vector towards where gravity is pulling (by default, negative Y). .. _class_Particles_get_material: - :ref:`Material` **get_material** **(** **)** const Return the material used to draw particles. .. _class_Particles_get_randomness: - :ref:`float` **get_randomness** **(** :ref:`int` variable **)** const Return the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. .. _class_Particles_get_variable: - :ref:`float` **get_variable** **(** :ref:`int` variable **)** const Return a specific variable for the particle system (see VAR\_\* enum). .. _class_Particles_get_visibility_aabb: - :ref:`AABB` **get_visibility_aabb** **(** **)** const Return the current visibility AABB. .. _class_Particles_has_height_from_velocity: - :ref:`bool` **has_height_from_velocity** **(** **)** const .. _class_Particles_is_emitting: - :ref:`bool` **is_emitting** **(** **)** const Return the "emitting" property state (see :ref:`set_emitting`). .. _class_Particles_is_using_local_coordinates: - :ref:`bool` **is_using_local_coordinates** **(** **)** const .. _class_Particles_set_amount: - void **set_amount** **(** :ref:`int` amount **)** Set total amount of particles in the system. .. _class_Particles_set_color_phase_color: - void **set_color_phase_color** **(** :ref:`int` phase, :ref:`Color` color **)** Set the color of a color phase. .. _class_Particles_set_color_phase_pos: - void **set_color_phase_pos** **(** :ref:`int` phase, :ref:`float` pos **)** Set the position of a color phase (0 to 1). .. _class_Particles_set_color_phases: - void **set_color_phases** **(** :ref:`int` count **)** .. _class_Particles_set_emission_base_velocity: - void **set_emission_base_velocity** **(** :ref:`Vector3` base_velocity **)** .. _class_Particles_set_emission_half_extents: - void **set_emission_half_extents** **(** :ref:`Vector3` half_extents **)** Set the half extents for the emission box. .. _class_Particles_set_emission_points: - void **set_emission_points** **(** :ref:`Vector3Array` points **)** .. _class_Particles_set_emit_timeout: - void **set_emit_timeout** **(** :ref:`float` timeout **)** .. _class_Particles_set_emitting: - void **set_emitting** **(** :ref:`bool` enabled **)** Set the "emitting" property state. When emitting, the particle system generates new particles at constant rate. .. _class_Particles_set_gravity_normal: - void **set_gravity_normal** **(** :ref:`Vector3` normal **)** Set the normal vector towards where gravity is pulling (by default, negative Y). .. _class_Particles_set_height_from_velocity: - void **set_height_from_velocity** **(** :ref:`bool` enable **)** .. _class_Particles_set_material: - void **set_material** **(** :ref:`Material` material **)** Set the material used to draw particles. .. _class_Particles_set_randomness: - void **set_randomness** **(** :ref:`int` variable, :ref:`float` randomness **)** Set the randomness for a specific variable of the particle system. Randomness produces small changes from the default each time a particle is emitted. .. _class_Particles_set_use_local_coordinates: - void **set_use_local_coordinates** **(** :ref:`bool` enable **)** .. _class_Particles_set_variable: - void **set_variable** **(** :ref:`int` variable, :ref:`float` value **)** Set a specific variable for the particle system (see VAR\_\* enum). .. _class_Particles_set_visibility_aabb: - void **set_visibility_aabb** **(** :ref:`AABB` aabb **)** Set the visibility AABB for the particle system, since the default one will not work properly most of the time.