Skip to content
EvilEngine.Api.Weapons

WeaponBeam record

public sealed record WeaponBeam

A beam a weapon shows, drawn by the engine as a glowing ribbon in the holder’s weapon colour from the view model’s muzzle in first person, or the holder’s right hand otherwise. It eases after its end, bows toward the aim while it lags and fades in and out on its own.

Assembly
EvilEngine.Api
Commit
4ff877b1

Members

WeaponBeam constructor

public WeaponBeam(MapVector Point)

A beam on a point: Point in the world, or in Body’s own space when it has one.

Point property

public MapVector Point { get; init; }

The end: a world point, or a point in the body’s space so the beam follows the body as it moves and turns.

Body property

public IPhysicsBody? Body { get; init; }

The physics body the beam is on, or null for a world point. A body that isn’t one of the session’s props ends the beam where the body is at the tick.

At method

public static WeaponBeam At(MapVector point)

A beam on a point in the world.

On method

public static WeaponBeam On(IPhysicsBody body, MapVector local)

A beam on a point in a body’s own space.