Struct CPUParticles
CPU-based 3D particle emitter.
struct CPUParticles
;
CPU-based 3D particle node used to create a variety of particle systems and effects.
See also Particles
, which provides the same functionality with hardware acceleration, but may not run on older devices.
Properties
Name | Type | Description |
---|---|---|
amount [get, set]
|
long | Number of particles emitted in one emission cycle. |
angle [get, set]
|
double | Initial rotation applied to each particle, in degrees. |
angleCurve [get, set]
|
Curve | Each particle's rotation will be animated along this Curve .
|
angleRandom [get, set]
|
double | Rotation randomness ratio. |
angularVelocity [get, set]
|
double | Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. |
angularVelocityCurve [get, set]
|
Curve | Each particle's angular velocity will vary along this Curve .
|
angularVelocityRandom [get, set]
|
double | Angular velocity randomness ratio. |
animOffset [get, set]
|
double | Particle animation offset. |
animOffsetCurve [get, set]
|
Curve | Each particle's animation offset will vary along this Curve .
|
animOffsetRandom [get, set]
|
double | Animation offset randomness ratio. |
animSpeed [get, set]
|
double | Particle animation speed. |
animSpeedCurve [get, set]
|
Curve | Each particle's animation speed will vary along this Curve .
|
animSpeedRandom [get, set]
|
double | Animation speed randomness ratio. |
color [get, set]
|
Color | Unused for 3D particles. |
colorRamp [get, set]
|
Gradient | Unused for 3D particles. |
damping [get, set]
|
double | The rate at which particles lose velocity. |
dampingCurve [get, set]
|
Curve | Damping will vary along this Curve .
|
dampingRandom [get, set]
|
double | Damping randomness ratio. |
direction [get, set]
|
Vector3 | Unit vector specifying the particles' emission direction. |
drawOrder [get, set]
|
CPUParticles | Particle draw order. Uses draworder values.
|
emissionBoxExtents [get, set]
|
Vector3 | The rectangle's extents if emissionShape is set to constant EMISSION_SHAPE_BOX .
|
emissionColors [get, set]
|
PoolArray!(godot.core.color.Color) | Sets the Color s to modulate particles by when using constant EMISSION_SHAPE_POINTS or constant EMISSION_SHAPE_DIRECTED_POINTS .
|
emissionNormals [get, set]
|
PoolArray!(godot.core.vector3.Vector3) | Sets the direction the particles will be emitted in when using constant EMISSION_SHAPE_DIRECTED_POINTS .
|
emissionPoints [get, set]
|
PoolArray!(godot.core.vector3.Vector3) | Sets the initial positions to spawn particles when using constant EMISSION_SHAPE_POINTS or constant EMISSION_SHAPE_DIRECTED_POINTS .
|
emissionShape [get, set]
|
CPUParticles | Particles will be emitted inside this region. See emissionshape for possible values.
|
emissionSphereRadius [get, set]
|
double | The sphere's radius if emissionshape is set to constant EMISSION_SHAPE_SPHERE .
|
emitting [get, set]
|
bool | If true , particles are being emitted.
|
explosiveness [get, set]
|
double | How rapidly particles in an emission cycle are emitted. If greater than 0 , there will be a gap in emissions before the next cycle begins.
|
fixedFps [get, set]
|
long | The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. |
flagAlignY [get, set]
|
bool | Align Y axis of particle with the direction of its velocity. |
flagDisableZ [get, set]
|
bool | If true , particles will not move on the z axis.
|
flagRotateY [get, set]
|
bool | If true , particles rotate around Y axis by angle .
|
flatness [get, set]
|
double | Amount of spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.
|
fractDelta [get, set]
|
bool | If true , results in fractional delta calculation which has a smoother particles display effect.
|
gravity [get, set]
|
Vector3 | Gravity applied to every particle. |
hueVariation [get, set]
|
double | Initial hue variation applied to each particle. |
hueVariationCurve [get, set]
|
Curve | Each particle's hue will vary along this Curve .
|
hueVariationRandom [get, set]
|
double | Hue variation randomness ratio. |
initialVelocity [get, set]
|
double | Initial velocity magnitude for each particle. Direction comes from spread and the node's orientation.
|
initialVelocityRandom [get, set]
|
double | Initial velocity randomness ratio. |
lifetime [get, set]
|
double | Amount of time each particle will exist. |
lifetimeRandomness [get, set]
|
double | Particle lifetime randomness ratio. |
linearAccel [get, set]
|
double | Linear acceleration applied to each particle in the direction of motion. |
linearAccelCurve [get, set]
|
Curve | Each particle's linear acceleration will vary along this Curve .
|
linearAccelRandom [get, set]
|
double | Linear acceleration randomness ratio. |
localCoords [get, set]
|
bool | If true , particles use the parent node's coordinate space. If false , they use global coordinates.
|
mesh [get, set]
|
Mesh | The Mesh used for each particle. If null , particles will be spheres.
|
oneShot [get, set]
|
bool | If true , only one emission cycle occurs. If set true during a cycle, emission will stop at the cycle's end.
|
orbitVelocity [get, set]
|
double | Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.
This property is only available when flagDisableZ is true .
|
orbitVelocityCurve [get, set]
|
Curve | Each particle's orbital velocity will vary along this Curve .
|
orbitVelocityRandom [get, set]
|
double | Orbital velocity randomness ratio. |
preprocess [get, set]
|
double | Particle system starts as if it had already run for this many seconds. |
radialAccel [get, set]
|
double | Radial acceleration applied to each particle. Makes particle accelerate away from origin. |
radialAccelCurve [get, set]
|
Curve | Each particle's radial acceleration will vary along this Curve .
|
radialAccelRandom [get, set]
|
double | Radial acceleration randomness ratio. |
randomness [get, set]
|
double | Emission lifetime randomness ratio. |
scaleAmount [get, set]
|
double | Initial scale applied to each particle. |
scaleAmountCurve [get, set]
|
Curve | Each particle's scale will vary along this Curve .
|
scaleAmountRandom [get, set]
|
double | Scale randomness ratio. |
speedScale [get, set]
|
double | Particle system's running speed scaling ratio. A value of 0 can be used to pause the particles.
|
spread [get, set]
|
double | Each particle's initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.
|
tangentialAccel [get, set]
|
double | Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. |
tangentialAccelCurve [get, set]
|
Curve | Each particle's tangential acceleration will vary along this Curve .
|
tangentialAccelRandom [get, set]
|
double | Tangential acceleration randomness ratio. |
Methods
Enums
Name | Description |
---|---|
Constants
|
|
DrawOrder
|
|
EmissionShape
|
|
Flags
|
|
Parameter
|