✈️trace

Functions:

ray

trace.ray(vec_start: vector, vec_end: vector, skip_entity: entity, mask: number): trace

Name
Type
Description

vec_start

vector

Vector to start tracing from

vec_end

vector

Vector to trace to

skip_entity

entity

Entity skipping options

mask

number

Trace mask

local trace_example = trace.ray(vector(0,0,0), vector(100, 100, 100), entity.get_local(), 0xFFFFFFFF)
local trace_fraction = trace_example.fraction

Returns a trace struct containing all the information.

πŸ”— struct trace

Name
Type
Description

fraction

number

Percentage in the range [0.0, 1.0]. How far the trace went before hitting something. 1.0 - didn't hit anything

hit_entity

entity

Entity that was hit by the trace

hitgroup

number

0 - generic, non-zero is specific body part

endpos

vector

Final position

Last updated