Shipyard Rapier
Physics plugin with rapier for the shipyard ECS.
Based of bevy_rapier plugin.
How to use
Setup the physics in the shipyard world:
let world = new;
world.run.unwrap;
Create an body and a collider component, add those to an existent entity, or create a new one:
let body = new_dynamic.translation;
let collider = cuboid.density;
all_storages.add_entity;
In your gameplay loop, execute the physics systems to simulate the world:
// Create rapier colliders, bodies and joints based on the shipyard components.
world.run.unwrap;
world.run.unwrap;
// Step the world based on a frame rate.
let frame_time = 60.0 / 1000.0; // 60 fps simulation
world.run_with_data.unwrap;
// Remove any physics components from deleted entities.
world.run.unwrap;