Api Sandbox SceneParticles
class

SceneParticles

public class SceneParticles : SceneObject

A SceneObject used to render particles. We need to be careful with what we do here, because this object is created for in-engine particles as well as custom scene object particles. With custom particles there's no automatic Simulate, or deletion.. You're completely on your own. This is perhaps a good thing though, it's maybe what you want to happen. To be completely isolated and completely in control. But at the same time maybe it's not and it's something we need to sort out.

Attributes

[ Obsolete ]

Constructors

SceneParticles(SceneWorld world, String particleSystem)

Create scene particles.

world — The scene world to create the particles in.
particleSystem — Path to the particle system file.
SceneParticles(SceneWorld world, ParticleSystem particleSystem)

Create scene particles.

world — The scene world to create the particles in.
particleSystem — Particle system resource.

Properties

Name Type Description
RenderParticles Boolean Whether to render the particles or not.
EmissionStopped Boolean Stop (or start) the particle system emission.
PhysicsWorld PhysicsWorld Particle collisions use this physics world to perform traces.
ActiveParticlesSelf Int32 The amount of particles
ActiveParticlesTotal Int32 The amount of particles including child systems
MaximumParticles Int32 The total allowed particle count
Finished Boolean True if particle system has reached the end
SimulationTime Single Get or set the simulation time

Methods

Boolean IsControlPointSet(Int32 index)

Whether given control point has any data set.

index — The control point index. Range is 0-63.
Vector3 GetControlPointPosition(Int32 index)

Returns the position set on a given control point.

index — The control point index. Range is 0-63.
Void SetControlPoint(Int32 i, Vector3 position)

Set position on given control point.

i — The control point index. Range is 0-63.
position — The position to set.
Void SetControlPoint(Int32 i, Rotation rotation)

Set rotation on given control point.

i — The control point index. Range is 0-63.
rotation — The rotation to set.
Void SetControlPoint(Int32 i, Transform transform)

Set transform on given control point.

i — The control point index. Range is 0-63.
transform — The transform to set.
Void SetControlPoint(Int32 i, ParticleSnapshot snapshot)

Set snapshot on given control point.

i — The control point index. Range is 0-63.
snapshot — The snapshot to set.
Void SetControlPoint(Int32 i, Model model)

Set model on given control point.

i — The control point index. Range is 0-63.
model — The model to set.
Void SetNamedValue(String name, Vector3 value)

Set vector on given named value.

name — The name of the key.
value — The value to set.
Void Simulate(Single f)

Simulate the particles for given amount of time.

f — Amount of time has passed since last simulation.
Void Emit(Int32 count)

Manually emit a bunch of particles

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.SceneParticles