dimforge / rapier.rs

Official website for the Rapier physics engine.
https://rapier.rs
17 stars 48 forks source link

Getting Started webpage: instantiates BroadPhase trait #102

Open davidljung opened 1 month ago

davidljung commented 1 month ago

The Getting Started page includes a Basic Simulation example. However, the line:

  let mut broad_phase = BroadPhase::new();

gives a compilation error. I changed it to:

  let mut broad_phase = BroadPhaseMultiSap::new();

and it seemed to work. However, I've only been learning Rust and Rapier for about 20mins - so just a guess.

sebcrozet commented 1 month ago

Thank you for reporting this. Yes, let mut broad_phase = BroadPhaseMultiSap::new(); or equivalently let mut broad_phase = DefaultBroadPhase::new(); will work.

We are currently working on making the website’s examples auto-verifiable by the CI to avoid these kinds of errors when rapier makes a breaking change.

Vrixyz commented 1 month ago

Foundation for a fix : https://github.com/dimforge/rapier.rs/pull/99 ; fixes for Rust + js will come in another PR. Moving the issue to rapier.rs