ITargetedEffectclass

An effect that gets aimed after it spawns - a tracer, beam or laser. Whoever spawns the effect feeds in whatever context it has. Only `Sandbox.ITargetedEffect.SetTarget(Sandbox.SceneAnchor)` is required - the rest default to doing nothing, so an effect implements just what it uses.

objectITargetedEffect
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public abstract interface Sandbox.ITargetedEffect

Methods3

Showing 3 methods

public virtual void SetNormal(Vector3 normal)PUBLICVIRTUAL

The surface normal at the target, when the target is a hit - for effects that orient to the surface (sparks, splashes).

ParameterTypeDescription
normalVector3
Returns:void

public virtual void SetStartPoint(Sandbox.SceneAnchor start)PUBLICVIRTUAL

The point the effect starts from, when that isn't where the effect spawned.

ParameterTypeDescription
startSceneAnchor
Returns:void

public virtual void SetTarget(Sandbox.SceneAnchor target)PUBLICVIRTUAL

The point the effect travels to or points at. Anchor it to a GameObject to follow it.

ParameterTypeDescription
targetSceneAnchor
Returns:void

On this page