Skip to content
EvilEngine.Api.Weapons

WeaponEffectAt record struct

public readonly record struct WeaponEffectAt

Where IWeaponHolder.Effect plays an effect: at a point in the world facing a normal, or on an attachment of the weapon’s own model.

holder.Effect(charge, WeaponEffectAt.On("muzzle"));
holder.Effect(scorch, WeaponEffectAt.At(hit.End, hit.Normal));
Assembly
EvilEngine.Api
Commit
4ff877b1

Members

Point property

public MapVector? Point { get; init; }

The point in the world, or null to play on an attachment.

Normal property

public MapVector Normal { get; init; }

The way the effect faces at its point, usually the surface’s normal from a WeaponTrace.

Attachment property

public string? Attachment { get; init; }

The attachment of the weapon’s model to play on, or null for its muzzle: the record’s attachments.muzzle, or muzzle.

Muzzle property

public static WeaponEffectAt Muzzle { get; }

On the weapon’s muzzle, the default.

At method

public static WeaponEffectAt At(MapVector point, MapVector normal)

At a point facing a normal.

On method

public static WeaponEffectAt On(string attachment)

On a named attachment of the weapon’s model.