s&box docs

public sealed class Sandbox.ParticleEffect : Sandbox.Component

Defines and holds particles. This is the core of the particle system.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 6 methods

public void ResetEmitters()

public void Step(float timeDelta)

public void Terminate(Sandbox.Particle p)

Properties

Showing 66 properties

public bool Sandbox.ParticleEffect.ApplyAlpha { get; set; }

Enables or disables alpha application for particles.

public bool Sandbox.ParticleEffect.ApplyColor { get; set; }

Enables or disables color application for particles.

public bool Sandbox.ParticleEffect.ApplyRotation { get; set; }

Enables or disables rotation for particles.

public bool Sandbox.ParticleEffect.ApplyShape { get; set; }

Enables or disables shape application for particles.

public Sandbox.TagSet Sandbox.ParticleEffect.CollisionIgnore { get; set; }

The set of tags to ignore during collision detection.

public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.CollisionPrefab { get; set; }

Will choose a random prefab to spawn from this list.

public bool Sandbox.ParticleEffect.CollisionPrefabAlign { get; set; }

When true the collision prefab will be aligned with the surface it collides with.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabChance { get; set; }

If 1 then we'll always spawn a prefab. If 0.5 then we'll spawn a prefab 50% of the time.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabRotation { get; set; }

We will by default align to the particle's angle, but we can also randomize that.

public float Sandbox.ParticleEffect.CollisionRadius { get; set; }

The radius used for collision detection.

public virtual int Sandbox.ParticleEffect.ComponentVersion { get; set; }

public Sandbox.ParticleVector3 Sandbox.ParticleEffect.ConstantMovement { get; set; }

Move this delta constantly. Ignores velocity, collisions and drag.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.Damping { get; set; }

The damping factor applied to particle velocity over time. This reduces the velocity of particles, simulating resistance or drag.

public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.DelayedParticles { get; set; }

Delayed particles in the effect. Delayed particles are those that have been emitted but are waiting to be activated based on their start delay.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.DieOnCollisionChance { get; set; }

The chance that a particle will die upon collision.

public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.FollowerPrefab { get; set; }

Will choose a random prefab to spawn from this list.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.FollowerPrefabChance { get; set; }

If 1 then we'll always spawn a prefab. If 0.5 then we'll spawn a prefab 50% of the time.

public bool Sandbox.ParticleEffect.FollowerPrefabKill { get; set; }

When true the prefab will be destroyed at the end of the particle's life.

public bool Sandbox.ParticleEffect.Force { get; set; }

Enables or disables the application of forces to particles.

public Vector3 Sandbox.ParticleEffect.ForceDirection { get; set; }

The direction of the force applied to particles.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.ForceScale { get; set; }

The scale of the force applied to each particle. This multiplier determines the intensity of the force applied to particles.

public Sandbox.ParticleEffect.SimulationSpace Sandbox.ParticleEffect.ForceSpace { get; set; }

The simulation space in which forces are applied. Forces can be applied in either local space (relative to the emitter) or world space.

public Sandbox.ParticleVector3 Sandbox.ParticleEffect.InitialVelocity { get; set; }

The initial velocity of the particle when it is created. This is applied before any forces are applied.

public bool Sandbox.ParticleEffect.IsFull { get; set; }

Whether the particle effect has reached its maximum capacity. This is determined by comparing the total particle count to the `Sandbox.ParticleEffect.MaxParticles` property.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.LocalSpace { get; set; }

When 1 particles will be moved in local space relative to the emitter GameObject's transform. This allows particles to be emitted in a local space, like a fire effect that moves with the player, but the particles can slowly move to world space.

public int Sandbox.ParticleEffect.MaxParticles { get; set; }

The maximum number of particles that can exist in this effect at once.

public float Sandbox.ParticleEffect.MaxParticleSize { get; set; }

The size of the largest particle in the effect. This is determined by the maximum scale of any particle along its x, y, or z axis.

public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleCreated { get; set; }

Called any time a particle is created.

public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleDestroyed { get; set; }

Called any time a particle is destroyed.

public System.Action`1<float> Sandbox.ParticleEffect.OnPostStep { get; set; }

Called after the particles are stepped. This allows custom logic to be executed after the simulation advances.

public System.Action`1<float> Sandbox.ParticleEffect.OnPreStep { get; set; }

Called before the particles are stepped. This allows custom logic to be executed before the simulation advances.

public System.Action`2<Sandbox.Particle,float> Sandbox.ParticleEffect.OnStep { get; set; }

Called after each particle is stepped. This provides an opportunity to modify individual particles during the simulation.

public Sandbox.ParticleVector3 Sandbox.ParticleEffect.OrbitalForce { get; set; }

The orbital force applied to particles, causing them to rotate around a point.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.OrbitalPull { get; set; }

The pull strength of the orbital force, drawing particles closer to the center.

public BBox Sandbox.ParticleEffect.ParticleBounds { get; set; }

The bounding box that encompasses all active particles. This is useful for determining the spatial extent of the particle effect.

public int Sandbox.ParticleEffect.ParticleCount { get; set; }

The total number of particles in the effect, including both active and delayed particles.

public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.Particles { get; set; }

Active particles in the effect. Active particles are those currently being simulated and rendered.

public bool Sandbox.ParticleEffect.Paused { get; set; }

Whether the particle simulation is currently paused. When paused, particles will not update their positions, velocities, or other properties.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.PerParticleTimeScale { get; set; }

Per-particle time scale multiplier. Allows each particle to have a unique simulation speed.

public float Sandbox.ParticleEffect.PreWarm { get; set; }

How many seconds to pre-warm this effect by when creating.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.PushStrength { get; set; }

The strength of the push force applied to particles upon collision.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceTime { get; set; }

Allows control of the sequence time, which spans from 0 to 1 for one loop.

public bool Sandbox.ParticleEffect.SheetSequence { get; set; }

Enables or disables the use of a sheet sequence for particles.

public bool Sandbox.ParticleEffect.SnapToFrame { get; set; }

When enabled, snap to the nearest whole frame instead of blending between frames.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartDelay { get; set; }

The delay before a particle starts after being emitted, in seconds.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartVelocity { get; set; }

Apply an element of random velocity to the particle when it is created, in a random direction.

public Sandbox.ParticleFloat Sandbox.ParticleEffect.Stretch { get; set; }

The stretch factor of particles, affecting their aspect ratio.

public float Sandbox.ParticleEffect.TimeScale { get; set; }

Scales the simulation time for this effect.

public bool Sandbox.ParticleEffect.UsePrefabFeature { get; set; }

Enables or disables the use of prefabs for particles.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.ParticleEffect

On this page

Constructorspublic ParticleEffect()Methodspublic System.Void Clear()public Sandbox.Particle Emit(Vector3 position, System.Single delta)public Sandbox.Particle Emit(Vector3 position)public System.Void ResetEmitters()public System.Void Step(System.Single timeDelta)public System.Void Terminate(Sandbox.Particle p)Propertiespublic Sandbox.ParticleFloat Sandbox.ParticleEffect.Alpha { get; set; }public System.Boolean Sandbox.ParticleEffect.ApplyAlpha { get; set; }public System.Boolean Sandbox.ParticleEffect.ApplyColor { get; set; }public System.Boolean Sandbox.ParticleEffect.ApplyRotation { get; set; }public System.Boolean Sandbox.ParticleEffect.ApplyShape { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Bounce { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Brightness { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Bumpiness { get; set; }public System.Boolean Sandbox.ParticleEffect.Collision { get; set; }public Sandbox.TagSet Sandbox.ParticleEffect.CollisionIgnore { get; set; }public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.CollisionPrefab { get; set; }public System.Boolean Sandbox.ParticleEffect.CollisionPrefabAlign { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabChance { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.CollisionPrefabRotation { get; set; }public System.Single Sandbox.ParticleEffect.CollisionRadius { get; set; }public virtual System.Int32 Sandbox.ParticleEffect.ComponentVersion { get; set; }public Sandbox.ParticleVector3 Sandbox.ParticleEffect.ConstantMovement { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Damping { get; set; }public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.DelayedParticles { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.DieOnCollisionChance { get; set; }public System.Collections.Generic.List`1<Sandbox.GameObject> Sandbox.ParticleEffect.FollowerPrefab { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.FollowerPrefabChance { get; set; }public System.Boolean Sandbox.ParticleEffect.FollowerPrefabKill { get; set; }public System.Boolean Sandbox.ParticleEffect.Force { get; set; }public Vector3 Sandbox.ParticleEffect.ForceDirection { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.ForceScale { get; set; }public Sandbox.ParticleEffect.SimulationSpace Sandbox.ParticleEffect.ForceSpace { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Friction { get; set; }public Sandbox.ParticleGradient Sandbox.ParticleEffect.Gradient { get; set; }public Sandbox.ParticleVector3 Sandbox.ParticleEffect.InitialVelocity { get; set; }public System.Boolean Sandbox.ParticleEffect.IsFull { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Lifetime { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.LocalSpace { get; set; }public System.Int32 Sandbox.ParticleEffect.MaxParticles { get; set; }public System.Single Sandbox.ParticleEffect.MaxParticleSize { get; set; }public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleCreated { get; set; }public System.Action`1<Sandbox.Particle> Sandbox.ParticleEffect.OnParticleDestroyed { get; set; }public System.Action`1<System.Single> Sandbox.ParticleEffect.OnPostStep { get; set; }public System.Action`1<System.Single> Sandbox.ParticleEffect.OnPreStep { get; set; }public System.Action`2<Sandbox.Particle,System.Single> Sandbox.ParticleEffect.OnStep { get; set; }public Sandbox.ParticleVector3 Sandbox.ParticleEffect.OrbitalForce { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.OrbitalPull { get; set; }public BBox Sandbox.ParticleEffect.ParticleBounds { get; set; }public System.Int32 Sandbox.ParticleEffect.ParticleCount { get; set; }public System.Collections.Generic.List`1<Sandbox.Particle> Sandbox.ParticleEffect.Particles { get; set; }public System.Boolean Sandbox.ParticleEffect.Paused { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.PerParticleTimeScale { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Pitch { get; set; }public System.Single Sandbox.ParticleEffect.PreWarm { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.PushStrength { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Roll { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Scale { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceId { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceSpeed { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.SequenceTime { get; set; }public System.Boolean Sandbox.ParticleEffect.SheetSequence { get; set; }public System.Boolean Sandbox.ParticleEffect.SnapToFrame { get; set; }public Sandbox.ParticleEffect.SimulationSpace Sandbox.ParticleEffect.Space { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartDelay { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.StartVelocity { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Stretch { get; set; }public System.Single Sandbox.ParticleEffect.TimeScale { get; set; }public Sandbox.ParticleEffect.TimingMode Sandbox.ParticleEffect.Timing { get; set; }public Color Sandbox.ParticleEffect.Tint { get; set; }public System.Boolean Sandbox.ParticleEffect.UsePrefabFeature { get; set; }public Sandbox.ParticleFloat Sandbox.ParticleEffect.Yaw { get; set; }Metadata