TracerEffectclass

A line effect that travels from this component's position to `Sandbox.TracerEffect.EndPoint` - a bullet tracer or beam. Drives a `Sandbox.SceneLineObject` and an optional light that travels with the line. Implements `Sandbox.ITargetedEffect` so a weapon model can aim it at the hit point.

objectRendererTracerEffect
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.TracerEffect : Sandbox.Renderer

Constructors1

Showing 1 constructors

Methods2

Showing 2 methods

public virtual sealed void SetStartPoint(Sandbox.SceneAnchor start)PUBLICVIRTUAL

`Sandbox.ITargetedEffect`: where the line starts from.

ParameterTypeDescription
startSceneAnchor
Returns:void

public virtual sealed void SetTarget(Sandbox.SceneAnchor target)PUBLICVIRTUAL

`Sandbox.ITargetedEffect`: the destination the line travels to.

ParameterTypeDescription
targetSceneAnchor
Returns:void

Properties15

Showing 15 properties

public bool Sandbox.TracerEffect.CastShadows { get; set; }PUBLICGETSET

The line casts shadows.

Returns:bool

public float Sandbox.TracerEffect.DistancePerSecond { get; set; }PUBLICGETSET

How fast the line travels, in units per second.

Returns:float

public bool Sandbox.TracerEffect.EnableLight { get; set; }PUBLICGETSET

A point light that travels with the line.

Returns:bool

public Sandbox.SceneAnchor Sandbox.TracerEffect.EndPoint { get; set; }PUBLICGETSET

Where the line travels to - a fixed world position, or anchored to an object it follows.

Returns:SceneAnchor

public float Sandbox.TracerEffect.Length { get; set; }PUBLICGETSET

Length of the visible line.

Returns:float

public Sandbox.Gradient Sandbox.TracerEffect.LightColor { get; set; }PUBLICGETSET

Light colour over the travel - 0 at the start, 1 at the end point.

Returns:Gradient

public float Sandbox.TracerEffect.LightPosition { get; set; }PUBLICGETSET

Where along the visible line the light sits - 0 the leading edge, 1 the tail.

Returns:float

public Sandbox.Curve Sandbox.TracerEffect.LightRadius { get; set; }PUBLICGETSET

Light radius over the travel - 0 at the start, 1 at the end point.

Returns:Curve

public Sandbox.Gradient Sandbox.TracerEffect.LineColor { get; set; }PUBLICGETSET

Colour along the line - 0 is the leading edge, 1 the tail.

Returns:Gradient

public Sandbox.Curve Sandbox.TracerEffect.LineWidth { get; set; }PUBLICGETSET

Width along the line - 0 is the leading edge, 1 the tail.

Returns:Curve

public bool Sandbox.TracerEffect.Opaque { get; set; }PUBLICGETSET

Render the line opaque rather than blended.

Returns:bool

public float Sandbox.TracerEffect.StartDistance { get; set; }PUBLICGETSET

How far along the travel the line starts - skips the stretch right out of the muzzle.

Returns:float

On this page