-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappersphysicsAll things related to physicsAll things related to physics
Description
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:
PhysicsWorld2Dtype managing the simulation- Configurable gravity
- Fixed timestep integration
- Builder pattern for world creation
Non-Goals:
- 3D physics
- Rigid bodies
- Collision shapes
Proposed API
// 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 stabilityMetadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestlambda-rsIssues pertaining to the core frameworkIssues pertaining to the core frameworklambda-rs-platformIssues pertaining to the dependency & platform wrappersIssues pertaining to the dependency & platform wrappersphysicsAll things related to physicsAll things related to physics