Skip to content

trace

The trace namespace. Nyx Lua API v1.

trace.line(from: vector, to: vector, opts: { mask: string?, skip: Player? }?) -> { fraction: number, end_pos: vector, player: Player?, hitgroup: number }?

A ray against the world (shot mask; 'vis' and skip are accepted and refined in part B). nil when nothing could be traced, or the trace is refused: during a level change, outside a match, in frame_stage on any stage but 5 (render start), or when the local player's pawn is no longer the one this frame saw.