Overview
Add an advanced API that exposes collider-level contact information for users
who need per-shape detail, while keeping the default public event system
body-oriented.
Current State
The public event stream aggregates collider pairs into one RigidBody2D pair.
That is the correct default for gameplay code, but it hides which attached
shape on a compound body actually participated in contact.
Scope
Goals:
- Add an opt-in advanced collision view for per-collider detail
- Preserve the current body-oriented event stream as the default API
- Avoid leaking backend vendor types into the public surface
- Define stable handle types for colliders if needed
Non-Goals:
- Replacing the body-oriented API
- Per-substep callbacks
- Full backend manifold exposure
Proposed API
pubstructColliderCollisionEvent{pubkind:CollisionEventKind,pubcollider_a:Collider2D,pubcollider_b:Collider2D,pubbody_a:RigidBody2D,pubbody_b:RigidBody2D,pubcontact_point:Option<[f32;2]>,pubnormal:Option<[f32;2]>,pubpenetration:Option<f32>,}implPhysicsWorld2D{pubfncollider_collision_events(&self,) -> implIterator<Item = ColliderCollisionEvent>;}Acceptance Criteria
Affected Crates
lambda-rs, lambda-rs-platform
Notes
- This should not be treated as the primary gameplay API.
- The design is stronger if the same backend data can feed both views.
Overview
Add an advanced API that exposes collider-level contact information for users
who need per-shape detail, while keeping the default public event system
body-oriented.
Current State
The public event stream aggregates collider pairs into one
RigidBody2Dpair.That is the correct default for gameplay code, but it hides which attached
shape on a compound body actually participated in contact.
Scope
Goals:
Non-Goals:
Proposed API
Acceptance Criteria
collider events
Affected Crates
lambda-rs, lambda-rs-platform
Notes