trace_t
Result of trace.line and trace.shape.
Result of trace.line and trace.shape.
| Field | Description |
|---|---|
fraction | Fraction travelled; 1 means no hit. |
start_pos, end_pos, hit_point, hit_normal | vector copies. |
hit_offset | Hit offset. |
start_in_solid, exact_hit_point | Trace flags. |
contents, triangle, hitbox_bone_index, ray_type | Collision metadata. |
hitbox | hitbox_t or nil. |
shape_attributes | rn_collision_attr_t. |
hit_entity | Opaque userdata, not an entity object. |
| Method | Returns |
|---|---|
tr:did_hit() | Whether the trace hit. |
tr:is_visible() | Whether fraction > 0.97. |
