Skip to main content

client.trace_line

Returns fraction, entindex. fraction is a percentage in the range [0.0, 1.0] that tells you how far the trace went before hitting something, so 1.0 means nothing was hit. entindex is the entity index that hit, or -1 if no entity was hit.

client.trace_line(skip_entindex: number, from_x: number, from_y: number, from_z: number, to_x: number, to_y: number, to_z: number): number, number

Arguments

NameDescriptionType
skip_entindexIgnore this entity while tracingnumber
from_xX coordinate of the start of the tracenumber
from_yY coordinate of the start of the tracenumber
from_zZ coordinate of the start of the tracenumber
to_xX coordinate of the end of the tracenumber
to_yY coordinate of the end of the tracenumber
to_zZ coordinate of the end of the tracenumber

Returns fraction: number, entindex: number