I have been starting to use Rapier for a project, and thought I would write down some of the sticking-points regarding the getting started guide. I am something of a newbie at rust and at physics engines, so feel free to close this issue if you think it is off-topic or if I am being to noobish.
The rust user guide for how to use bevy ends with the main loops being:
loop {
pipeline.step(
&gravity,
&integration_parameters,
&mut broad_phase,
&mut narrow_phase,
&mut bodies,
&mut colliders,
&mut joints,
&mut ccd_solver,
&physics_hooks,
&event_handler
);
}
for all the demos.
As a new user of rapier, I was initially confused how to get information back out of the engine (aka what do I do with a body handle). Perhaps extending the first example with:
println!(bodies.get(body_handle).position())
I initially found attaching collision shapes to rigid bodies fairly confusing: To me a CollisionSet
was a just set of collision shapes - the same as the RigidBodySet
is just a set of rigid bodies. This isn't helped by the getting started guide stating
A collider set is a container that maps a unique handle to a collider:
Perhaps a simple change to:
A collider set is a container that maps a unique handle to a collider and maps colliders to rigid bodies
Do you think it is worth me creating a PR with these changes?
Side note, why does every rust project have a bunch of documentation outside cargo-doc
? It means I have to learn dozens of different static site generators to make PR's on them, and it's out-of-sync with the codebase, not auto-tested etc. etc.
Have you considering moving the pure-rust documentation into the crates module-level docs? There is a lot of stuff that can be directly copy-pasted from one to the other. Is it worth creating a bunch of PR's on the main Rapier repo doing this?