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

NameTypeDescription
amount[get, set] longNumber of particles emitted in one emission cycle.
angle[get, set] doubleInitial rotation applied to each particle, in degrees.
angleCurve[get, set] CurveEach particle's rotation will be animated along this Curve.
angleRandom[get, set] doubleRotation randomness ratio.
angularVelocity[get, set] doubleInitial angular velocity applied to each particle. Sets the speed of rotation of the particle.
angularVelocityCurve[get, set] CurveEach particle's angular velocity will vary along this Curve.
angularVelocityRandom[get, set] doubleAngular velocity randomness ratio.
animOffset[get, set] doubleParticle animation offset.
animOffsetCurve[get, set] CurveEach particle's animation offset will vary along this Curve.
animOffsetRandom[get, set] doubleAnimation offset randomness ratio.
animSpeed[get, set] doubleParticle animation speed.
animSpeedCurve[get, set] CurveEach particle's animation speed will vary along this Curve.
animSpeedRandom[get, set] doubleAnimation speed randomness ratio.
color[get, set] ColorUnused for 3D particles.
colorRamp[get, set] GradientUnused for 3D particles.
damping[get, set] doubleThe rate at which particles lose velocity.
dampingCurve[get, set] CurveDamping will vary along this Curve.
dampingRandom[get, set] doubleDamping randomness ratio.
direction[get, set] Vector3Unit vector specifying the particles' emission direction.
drawOrder[get, set] CPUParticles.DrawOrderParticle draw order. Uses draworder values.
emissionBoxExtents[get, set] Vector3The rectangle's extents if emissionShape is set to constant EMISSION_SHAPE_BOX.
emissionColors[get, set] PoolArray!(godot.core.color.Color)Sets the Colors 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.EmissionShapeParticles will be emitted inside this region. See emissionshape for possible values.
emissionSphereRadius[get, set] doubleThe sphere's radius if emissionshape is set to constant EMISSION_SHAPE_SPHERE.
emitting[get, set] boolIf true, particles are being emitted.
explosiveness[get, set] doubleHow 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] longThe 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] boolAlign Y axis of particle with the direction of its velocity.
flagDisableZ[get, set] boolIf true, particles will not move on the z axis.
flagRotateY[get, set] boolIf true, particles rotate around Y axis by angle.
flatness[get, set] doubleAmount of spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.
fractDelta[get, set] boolIf true, results in fractional delta calculation which has a smoother particles display effect.
gravity[get, set] Vector3Gravity applied to every particle.
hueVariation[get, set] doubleInitial hue variation applied to each particle.
hueVariationCurve[get, set] CurveEach particle's hue will vary along this Curve.
hueVariationRandom[get, set] doubleHue variation randomness ratio.
initialVelocity[get, set] doubleInitial velocity magnitude for each particle. Direction comes from spread and the node's orientation.
initialVelocityRandom[get, set] doubleInitial velocity randomness ratio.
lifetime[get, set] doubleAmount of time each particle will exist.
lifetimeRandomness[get, set] doubleParticle lifetime randomness ratio.
linearAccel[get, set] doubleLinear acceleration applied to each particle in the direction of motion.
linearAccelCurve[get, set] CurveEach particle's linear acceleration will vary along this Curve.
linearAccelRandom[get, set] doubleLinear acceleration randomness ratio.
localCoords[get, set] boolIf true, particles use the parent node's coordinate space. If false, they use global coordinates.
mesh[get, set] MeshThe Mesh used for each particle. If null, particles will be spheres.
oneShot[get, set] boolIf true, only one emission cycle occurs. If set true during a cycle, emission will stop at the cycle's end.
orbitVelocity[get, set] doubleOrbital 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] CurveEach particle's orbital velocity will vary along this Curve.
orbitVelocityRandom[get, set] doubleOrbital velocity randomness ratio.
preprocess[get, set] doubleParticle system starts as if it had already run for this many seconds.
radialAccel[get, set] doubleRadial acceleration applied to each particle. Makes particle accelerate away from origin.
radialAccelCurve[get, set] CurveEach particle's radial acceleration will vary along this Curve.
radialAccelRandom[get, set] doubleRadial acceleration randomness ratio.
randomness[get, set] doubleEmission lifetime randomness ratio.
scaleAmount[get, set] doubleInitial scale applied to each particle.
scaleAmountCurve[get, set] CurveEach particle's scale will vary along this Curve.
scaleAmountRandom[get, set] doubleScale randomness ratio.
speedScale[get, set] doubleParticle system's running speed scaling ratio. A value of 0 can be used to pause the particles.
spread[get, set] doubleEach particle's initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.
tangentialAccel[get, set] doubleTangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
tangentialAccelCurve[get, set] CurveEach particle's tangential acceleration will vary along this Curve.
tangentialAccelRandom[get, set] doubleTangential acceleration randomness ratio.

Methods

NameDescription
_updateRenderThread
convertFromParticles Sets this node's properties to match a given Particles node with an assigned ParticlesMaterial.
getAmount
getColor
getColorRamp
getDirection
getDrawOrder
getEmissionBoxExtents
getEmissionColors
getEmissionNormals
getEmissionPoints
getEmissionShape
getEmissionSphereRadius
getExplosivenessRatio
getFixedFps
getFlatness
getFractionalDelta
getGravity
getLifetime
getLifetimeRandomness
getMesh
getOneShot
getParam Returns the base value of the parameter specified by parameter.
getParamCurve Returns the Curve of the parameter specified by parameter.
getParamRandomness Returns the randomness factor of the parameter specified by parameter.
getParticleFlag Returns the enabled state of the given flag (see flags for options).
getPreProcessTime
getRandomnessRatio
getSpeedScale
getSpread
getUseLocalCoordinates
isEmitting
restart Restarts the particle emitter.
setAmount
setColor
setColorRamp
setDirection
setDrawOrder
setEmissionBoxExtents
setEmissionColors
setEmissionNormals
setEmissionPoints
setEmissionShape
setEmissionSphereRadius
setEmitting
setExplosivenessRatio
setFixedFps
setFlatness
setFractionalDelta
setGravity
setLifetime
setLifetimeRandomness
setMesh
setOneShot
setParam Sets the base value of the parameter specified by parameter.
setParamCurve Sets the Curve of the parameter specified by parameter.
setParamRandomness Sets the randomness factor of the parameter specified by parameter.
setParticleFlag Enables or disables the given flag (see flags for options).
setPreProcessTime
setRandomnessRatio
setSpeedScale
setSpread
setUseLocalCoordinates

Enums

NameDescription
Constants
DrawOrder
EmissionShape
Flags
Parameter