Physics plugin with rapier for the shipyard ECS.
Based of bevy_rapier plugin.
Setup the physics in the shipyard world:
rust
let world = World::new();
world.run(setup_physics).unwrap();
Create an body and a collider component, add those to an existent entity, or create a new one:
rust
let body = RigidBodyBuilder::new_dynamic().translation(x, y);
let collider = ColliderBuilder::cuboid(rad, rad).density(1.0);
all_storages.add_entity((body, collider));
In your gameplay loop, execute the physics systems to simulate the world: ```rust // Create rapier colliders, bodies and joints based on the shipyard components. world.run(createbodyandcollidersystem).unwrap(); world.run(createjointssystem).unwrap();
// Step the world based on a frame rate. let frametime = 60.0 / 1000.0; // 60 fps simulation world.runwithdata(stepworldsystem, frametime).unwrap();
// Remove any physics components from deleted entities. world.run(destroybodyandcollidersystem).unwrap(); ```