Skip to Content

trace_t

Result of trace.line and trace.shape.


Result of trace.line and trace.shape.

FieldDescription
fractionFraction travelled; 1 means no hit.
start_pos, end_pos, hit_point, hit_normalvector copies.
hit_offsetHit offset.
start_in_solid, exact_hit_pointTrace flags.
contents, triangle, hitbox_bone_index, ray_typeCollision metadata.
hitboxhitbox_t or nil.
shape_attributesrn_collision_attr_t.
hit_entityOpaque userdata, not an entity object.
MethodReturns
tr:did_hit()Whether the trace hit.
tr:is_visible()Whether fraction > 0.97.