Overview
Add query-side filtering so gameplay systems can restrict point queries, AABB
queries, and raycasts to selected collision groups or ignore specific bodies
without mutating collider-owned filter state.
Current State
query_point(), query_aabb(), and raycast() in
crates/lambda-rs/src/physics/mod.rs query all visible colliders and return
body-oriented results. There is no way to ask "only world geometry" or
"ignore the player" through the public API.
Scope
Goals:
- Add query configuration for groups, masks, and ignored bodies
- Preserve simple convenience overloads for the common no-filter case
- Keep query behavior read-only and backend-agnostic
- Define how query filters compose with collider-owned filters
Non-Goals:
- Arbitrary user-provided predicate callbacks in the first iteration
- Trigger volumes
- Per-shape query callbacks
Proposed API
pubstructQueryFilter2D{pubgroup:Option<u32>,pubmask:Option<u32>,pubignore_bodies:Vec<RigidBody2D>,}implPhysicsWorld2D{pubfnquery_point_filtered(&self,point:[f32;2],filter:&QueryFilter2D,) -> Vec<RigidBody2D>;pubfnquery_aabb_filtered(&self,min:[f32;2],max:[f32;2],filter:&QueryFilter2D,) -> Vec<RigidBody2D>;pubfnraycast_filtered(&self,origin:[f32;2],dir:[f32;2],max_dist:f32,filter:&QueryFilter2D,) -> Option<RaycastHit>;}Acceptance Criteria
Affected Crates
lambda-rs-platform, lambda-rs
Notes
- A small fixed-capacity ignore set may be useful later for hot paths.
- Query filtering should not silently mutate or reinterpret collider-owned
collision filters.
Overview
Add query-side filtering so gameplay systems can restrict point queries, AABB
queries, and raycasts to selected collision groups or ignore specific bodies
without mutating collider-owned filter state.
Current State
query_point(),query_aabb(), andraycast()incrates/lambda-rs/src/physics/mod.rsquery all visible colliders and returnbody-oriented results. There is no way to ask "only world geometry" or
"ignore the player" through the public API.
Scope
Goals:
Non-Goals:
Proposed API
Acceptance Criteria
collision filters
Affected Crates
lambda-rs-platform, lambda-rs
Notes
collision filters.