API ReferenceSandbox
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.
object→ITargetedEffect
Methods3
Showing 3 methods
public virtual void SetNormal(Vector3 normal)
The surface normal at the target, when the target is a hit - for effects that orient to the surface (sparks, splashes).
| Parameter | Type | Description |
|---|---|---|
| normal | Vector3 | — |
Returns:
void—public virtual void SetStartPoint(Sandbox.SceneAnchor start)
The point the effect starts from, when that isn't where the effect spawned.
| Parameter | Type | Description |
|---|---|---|
| start | SceneAnchor | — |
Returns:
void—public virtual void SetTarget(Sandbox.SceneAnchor target)
The point the effect travels to or points at. Anchor it to a GameObject to follow it.
| Parameter | Type | Description |
|---|---|---|
| target | SceneAnchor | — |
Returns:
void—No results match this filter.