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

Node that interacts with particles in a given area by applying forces and changing the particles' velocity. More...

Inheritance diagram for godot::PixelpartForceField:
[legend]

Public Member Functions

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.
 

Public Attributes

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

Node that interacts with particles in a given area by applying forces and changing the particles' velocity.

Force fields affect particles by attracting, repelling or accelerating them in some direction and can be used to model gravity, wind and other natural effects.

Member Function Documentation

◆ get_strength()

Ref< PixelpartAnimatedPropertyFloat > godot::PixelpartForceField::get_strength ( ) const

How strongly particles are affected by the force field.

Negative values reverse the force direction. Attraction fields then repel particles, for example.

Returns
Strength propery

◆ is_infinite()

bool godot::PixelpartForceField::is_infinite ( ) const

Whether the force field has an infinite area of effect.

Returns
Whether the force field has an infinite area of effect.

◆ set_infinite()

void godot::PixelpartForceField::set_infinite ( bool mode)

Set whether the force field has an infinite area of effect.

Parameters
modeWhether the force field has an infinite area of effect.

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