### Overview Create a 2D physics world that manages rigid bodies, collision detection, and physics simulation stepping. This is the foundation for all 2D physics. ### Current State No physics support exists in lambda-rs. Games cannot simulate physical interactions. ### Scope **Goals:** - `PhysicsWorld2D` type managing the simulation - Configurable gravity - Fixed timestep integration - Builder pattern for world creation **Non-Goals:** - 3D physics - Rigid bodies - Collision shapes ### Proposed API ```rust // crates/lambda-rs/src/physics/mod.rs pub struct PhysicsWorld2D { // rapier2d pipeline or similar } pub struct PhysicsWorld2DBuilder { gravity: [f32; 2], timestep: f32, } impl PhysicsWorld2DBuilder { pub fn new() -> Self; pub fn with_gravity(self, x: f32, y: f32) -> Self; pub fn with_timestep(self, dt: f32) -> Self; ``` ### Acceptance Criteria - [ ] PhysicsWorld2D can be constructed with builder - [ ] Gravity is configurable (default 0, -9.81) - [ ] `step()` advances simulation by fixed timestep - [ ] World can exist without any bodies - [ ] Unit tests for world creation and stepping ### Affected Crates lambda-rs, lambda-rs-platform ### Notes - Fixed timestep typically 1/60 second - Consider sub-stepping for stability
Activity
feat(lambda-rs): Add 2D physics world for managing physics in 2D envi…