Skip to Content

trace_filter_t

Trace filter: interaction mask, collision group, entity iteration and an optional should_hit predicate.


trace_filter_t(interacts_with, collision_group, iterate_entities, should_hit?)

interacts_with must be a whole number and iterate_entities a boolean. When entity iteration is enabled, should_hit(entity) runs during the trace. Returning false skips that entity.

If the predicate raises, the error is reported once and the predicate is removed. Later entities are treated as hittable by the predicate.

Fields: interacts_with, interacts_exclude, interacts_as (numbers), object_set_mask, collision_group, iterate_entities.

trace_filter_base_t is the engine filter type trace_filter_t derives from: the same six fields and no constructor. trace.line and trace.shape accept either.