s&box docs

public sealed class Sandbox.BeamEffect : Sandbox.Component

The BeamEffect component creates a visual beam effect in the scene, simulating a continuous line or laser-like effect. Unlike LineRenderer these beams can change over time, spawn multiple instances, and have various properties like color, texture, and lifetime. This is a useful component for creating things like laser beams, energy effects and tracers.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

Showing 1 methods

Properties

Showing 27 properties

public bool Sandbox.BeamEffect.Additive { get; set; }

If true, the beam is rendered additively, making it appear to glow.

public Sandbox.ParticleFloat Sandbox.BeamEffect.Alpha { get; set; }

Alpha multiplier for the beam's color. Controls transparency over the beam's lifetime.

public Sandbox.ParticleGradient Sandbox.BeamEffect.BeamColor { get; set; }

Color gradient of the beam over its lifetime. Defines how the color changes from birth to death.

public Sandbox.ParticleFloat Sandbox.BeamEffect.BeamLifetime { get; set; }

Lifetime of each beam in seconds. Determines how long a beam remains before being removed or respawned.

public float Sandbox.BeamEffect.BeamsPerSecond { get; set; }

Number of beams spawned per second. Controls the spawn rate for continuous effects.

public Sandbox.ParticleFloat Sandbox.BeamEffect.Brightness { get; set; }

Brightness multiplier for the beam's color. Adjusts intensity over the beam's lifetime.

public float Sandbox.BeamEffect.DepthFeather { get; set; }

Amount of feathering applied to the beam's depth, softening its intersection with geometry.

public Sandbox.Rendering.FilterMode Sandbox.BeamEffect.FilterMode { get; set; }

Controls texture filtering on this beam effect.

public bool Sandbox.BeamEffect.FollowPoints { get; set; }

If true, the beam endpoints follow their source and target positions each frame, updating dynamically.

public int Sandbox.BeamEffect.InitialBurst { get; set; }

Number of beams spawned immediately when the effect is enabled.

public bool Sandbox.BeamEffect.Lighting { get; set; }

If true, the beam is affected by scene lighting.

public bool Sandbox.BeamEffect.Looped { get; set; }

If true, beams respawn automatically when they expire, creating a looping effect.

public Sandbox.Material Sandbox.BeamEffect.Material { get; set; }

Material applied to the beam. Defines the visual appearance along the beam's length. The material should be based on the `line.shader`.

public int Sandbox.BeamEffect.MaxBeams { get; set; }

Maximum number of beams that can exist at once. Limits the total active beams.

public bool Sandbox.BeamEffect.Opaque { get; set; }

If true, the beam is rendered as opaque rather than transparent.

public Sandbox.ParticleFloat Sandbox.BeamEffect.Scale { get; set; }

Thickness of the beam in world units. Controls how wide the beam appears.

public bool Sandbox.BeamEffect.Shadows { get; set; }

If true, the beam casts shadows in the scene.

public Sandbox.GameObject Sandbox.BeamEffect.TargetGameObject { get; set; }

GameObject to target with the beam. If assigned, overrides TargetPosition and uses the object's world position as the endpoint.

public Vector3 Sandbox.BeamEffect.TargetPosition { get; set; }

World position the beam targets if no target object is set. Used as the endpoint for the beam.

public Vector3 Sandbox.BeamEffect.TargetRandom { get; set; }

Random offset applied to the target position for visual variation. Adds randomness to the endpoint.

public Sandbox.Texture Sandbox.BeamEffect.Texture { get; set; }Obsolete

Texture applied to the beam. Defines the visual appearance along the beam's length.

Obsolete: Use Material instead

public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureOffset { get; set; }

Offset of the texture along the beam. Shifts the texture start position.

public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScale { get; set; }

Scale of the texture along the beam. Controls how many world units each texture tile covers.

public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScroll { get; set; }

This is pretty much the same as TextureOffset - but it's seperate so you can use offset for offset, and scroll to scroll.

public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScrollSpeed { get; set; }

Speed at which the texture scrolls along the beam. Positive values scroll in one direction, negative in the other.

public bool Sandbox.BeamEffect.TravelBetweenPoints { get; set; }

If true, the beam visually travels from start to end, useful for tracer effects.

public Sandbox.ParticleFloat Sandbox.BeamEffect.TravelLerp { get; set; }

Controls the interpolation of the beam's travel effect over its lifetime.

Metadata

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

On this page

Constructorspublic BeamEffect()Methodspublic Sandbox.BeamEffect.BeamInstance SpawnBeam()Propertiespublic System.Boolean Sandbox.BeamEffect.Additive { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.Alpha { get; set; }public Sandbox.ParticleGradient Sandbox.BeamEffect.BeamColor { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.BeamLifetime { get; set; }public System.Single Sandbox.BeamEffect.BeamsPerSecond { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.Brightness { get; set; }public System.Single Sandbox.BeamEffect.DepthFeather { get; set; }public Sandbox.Rendering.FilterMode Sandbox.BeamEffect.FilterMode { get; set; }public System.Boolean Sandbox.BeamEffect.FollowPoints { get; set; }public System.Int32 Sandbox.BeamEffect.InitialBurst { get; set; }public System.Boolean Sandbox.BeamEffect.Lighting { get; set; }public System.Boolean Sandbox.BeamEffect.Looped { get; set; }public Sandbox.Material Sandbox.BeamEffect.Material { get; set; }public System.Int32 Sandbox.BeamEffect.MaxBeams { get; set; }public System.Boolean Sandbox.BeamEffect.Opaque { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.Scale { get; set; }public System.Boolean Sandbox.BeamEffect.Shadows { get; set; }public Sandbox.GameObject Sandbox.BeamEffect.TargetGameObject { get; set; }public Vector3 Sandbox.BeamEffect.TargetPosition { get; set; }public Vector3 Sandbox.BeamEffect.TargetRandom { get; set; }public Sandbox.Texture Sandbox.BeamEffect.Texture { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureOffset { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScale { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScroll { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.TextureScrollSpeed { get; set; }public System.Boolean Sandbox.BeamEffect.TravelBetweenPoints { get; set; }public Sandbox.ParticleFloat Sandbox.BeamEffect.TravelLerp { get; set; }Metadata