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

Force field that accelerates particles towards a given direction. More...

Inheritance diagram for godot::PixelpartAccelerationField:
[legend]

Public Member Functions

Ref< PixelpartAnimatedPropertyFloat3get_acceleration_direction () const
 Direction in which particles are accelerated, in degrees. For 3D effects, the direction is composed of roll, yaw and pitch.
 
Ref< PixelpartAnimatedPropertyFloatget_acceleration_direction_variance () const
 How much the force direction varies between cells of the grid.
 
Ref< PixelpartAnimatedPropertyFloatget_acceleration_strength_variance () const
 How much the force strength varies between cells of the grid.
 
void set_acceleration_grid_size (int x, int y, int z)
 Set the number of cells in each dimension of the force field grid.
 
int get_acceleration_grid_size_x () const
 The number of grid cells on the X axis of the force field grid.
 
int get_acceleration_grid_size_y () const
 The number of grid cells on the Y axis of the force field grid.
 
int get_acceleration_grid_size_z () const
 The number of grid cells on the Z axis of the force field grid.
 
- Public Member Functions inherited from godot::PixelpartForceField
void set_infinite (bool mode)
 Set whether the force field has an infinite area of effect.
 
bool is_infinite () const
 Whether the force field has an infinite area of effect.
 
Ref< PixelpartAnimatedPropertyFloatget_strength () const
 How strongly particles are affected by the force field.
 
- 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.
 

Additional Inherited Members

- Public Attributes inherited from godot::PixelpartForceField
bool infinite
 Whether the force field has an infinite area of effect.
 
- 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

Force field that accelerates particles towards a given direction.

Acceleration fields also allow you to subdivide the force area with a grid, where each grid cell has a different force direction and strength. This can be useful for organic looking particle motion.

Member Function Documentation

◆ get_acceleration_direction()

Ref< PixelpartAnimatedPropertyFloat3 > godot::PixelpartAccelerationField::get_acceleration_direction ( ) const

Direction in which particles are accelerated, in degrees. For 3D effects, the direction is composed of roll, yaw and pitch.

Returns
Acceleration direction property

◆ get_acceleration_direction_variance()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartAccelerationField::get_acceleration_direction_variance ( ) const

How much the force direction varies between cells of the grid.

Returns
Acceleration direction variance property

◆ get_acceleration_grid_size_x()

int godot::PixelpartAccelerationField::get_acceleration_grid_size_x ( ) const

The number of grid cells on the X axis of the force field grid.

Returns
Size on X axis

◆ get_acceleration_grid_size_y()

int godot::PixelpartAccelerationField::get_acceleration_grid_size_y ( ) const

The number of grid cells on the Y axis of the force field grid.

Returns
Size on Y axis

◆ get_acceleration_grid_size_z()

int godot::PixelpartAccelerationField::get_acceleration_grid_size_z ( ) const

The number of grid cells on the Z axis of the force field grid.

Returns
Size on Z axis

◆ get_acceleration_strength_variance()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartAccelerationField::get_acceleration_strength_variance ( ) const

How much the force strength varies between cells of the grid.

Returns
Acceleration strength variance property

◆ set_acceleration_grid_size()

void godot::PixelpartAccelerationField::set_acceleration_grid_size ( int x,
int y,
int z )

Set the number of cells in each dimension of the force field grid.

Each cell of the grid varies in direction and strength determined by the direction and strength variance values.

Parameters
xSize on X axis
ySize on Y axis
zSize on Z axis

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