Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Started webpage: instantiates BroadPhase trait #102

Closed
davidljung opened this issue May 26, 2024 · 2 comments
Closed

Getting Started webpage: instantiates BroadPhase trait #102

davidljung opened this issue May 26, 2024 · 2 comments
Labels
bug Something isn't working D-Easy "easy" task M-Rust about rapier crate P-High High Priority S-in-progress Work has been started

Comments

@davidljung
Copy link

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
Copy link
Member

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
Copy link
Contributor

Vrixyz commented May 31, 2024

Foundation for a fix : #99 ; fixes for Rust + js will come in another PR. Moving the issue to rapier.rs

@Vrixyz Vrixyz transferred this issue from dimforge/rapier May 31, 2024
@Vrixyz Vrixyz added bug Something isn't working S-in-progress Work has been started P-High High Priority M-Rust about rapier crate D-Easy "easy" task labels Jun 4, 2024
Vrixyz added a commit to Vrixyz/rapier.rs that referenced this issue Jun 4, 2024
Feedbacks:

- getting started
  - broadphase dimforge#102
- nalgebra
  - [1.0, 2.0].into() -> set its type explicitly to avoid inferring,
    as it could easily lead to multiple impls (with Into<glam::Vec2> if
   rapier is in dependency tree)
  - "but with a semantic than vectors" -> different
- simulation structures
  - ignoring code snippet from
https://rapier.rs/docs/user_guides/rust/simulation_structures#query-pipeline
  - "any feature useful" -> "any useful feature"
- rigid-bodies
  - rigid_body.set_rotation(0.2, true); ->
   rigid_body.set_rotation(UnitComplex::new(0.2), true);
  - additional_principal_angular_inertia ->
     additional_mass_properties
  - incorrect rapier tag for RapierContext, changed to
<bevy>
- collider
  - Compound not so easy to use, adapted code (isometry
  (using glam), shape)
- Joints
  - *JointSet do not take rigidbodyset as parameter
    anymore.
@Vrixyz Vrixyz closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working D-Easy "easy" task M-Rust about rapier crate P-High High Priority S-in-progress Work has been started
Projects
None yet
Development

No branches or pull requests

3 participants