OptionalcollisionBit set of groups the query belongs to. Defaults to every bit.
OptionalcollisionBit set of groups the query may hit. Defaults to every bit.
OptionalignoredBodies to skip entirely — §30's "ignored bodies", whose canonical use is excluding the character that cast the ray. Compared by handle identity.
OptionalignoredIndividual colliders to skip, for when a body has several and only some should be invisible to the query.
OptionalincludeWhether sensors take part (§30 "sensor inclusion"). Defaults to false:
a sensor exerts no forces (§24) and is usually a trigger volume rather
than geometry, so line-of-sight and ground checks should not stop at one.
OptionalmaxUpper bound on the number of hits returned. Defaults to unbounded, and is
forced to 1 when mode is "first".
OptionalmodeStop at the first hit or collect them all (§30). Defaults to "all".
"first" means the nearest hit for the ray and shape casts, which sweep
in order; for overlap and point queries, where there is no natural order,
it means an arbitrary one.
Centre of the shape in world space.
Optionalpredicate§30's "custom filters" — the last word on whether a candidate counts.
Called after the cheap tests above have passed, once per candidate, and must be a pure function of its argument: it runs inside the query, its call order is the solver's traversal order, and a predicate with side effects would make query results depend on that order (§33).
OptionalrotationOrientation of the shape. Defaults to identity.
The volume to test. Must suit the world's dimension (§21, §24).
OptionalsortedSort hits by ascending distance before returning them (§30 "sorted hits").
Defaults to false, because sorting costs and many callers only count or
scan. Ignored for OverlapQuery, whose hits carry no distance.
Everything overlapping a static shape (§30, §37
overlap).This one record covers both §30 world-level forms:
overlapSphereis an overlap with a"sphere"shape (a"circle"in a"2d"world) andoverlapBoxone with a"box"(a"rectangle"in 2D), exactly as §21 requires — parallel naming, one API surface.