dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.91k stars 244 forks source link

Getting started page example is not working #316

Closed emadbaqeri closed 2 years ago

emadbaqeri commented 2 years ago

I had started to read the documentation and used the traditional style of command + c to get something up and running :) But the compiler is blaming about this line

  let mut joint_set = ImpulseJointSet::new();

This is the error I'm getting,

failed to resolve: could not find `ImpulseJointSet` in `rapier3d`
could not find `ImpulseJointSet` in `rapier3d`rustc[E0433](https://doc.rust-lang.org/error-index.html#E0433)

How am I supposed to call this and get this example up and running.

sebcrozet commented 2 years ago

Hi! The user-guide is currently documenting the version 0.12.0-alpha.0 of Rapier. Chances are that you are using the version 0.11.

emadbaqeri commented 2 years ago

Hi @sebcrozet, I have no idea about that. because there is no versioning indicator on the website. But for the code I have also tried to use

use rapier3d::dynamics::{ImpulseJoinSet}

Which didn't work unfortunately, any idea on this how can I read the write documentation? Are you having it in the source code but you have not published it or something?

sebcrozet commented 2 years ago

Yeah, the versioning could be made more obvious. The ImpulseJointSet doesn’t exist in the version 0.11 (it was named JointSet). So you need to at least switch to 0.12.0-alpha.0.

Are you having it in the source code but you have not published it or something?

The version 0.12.0-alpha.0 is already published: https://crates.io/crates/rapier3d/versions

emadbaqeri commented 2 years ago

thanks for the quick response. It made the situation worse for me. I should first take a look at the source code then try to build something for my self. You think is there anything that I can help on anything? I background of javascript and already trying to learn rust

sebcrozet commented 2 years ago

You think is there anything that I can help on anything? I background of javascript and already trying to learn rust

Something that could be interesting is experimenting with writing a character controller or vehicle controller with Rapier.

emadbaqeri commented 2 years ago

You think is there anything that I can help on anything? I background of javascript and already trying to learn rust

Something that could be interesting is experimenting with writing a character controller or vehicle controller with Rapier.

Seems interesting and fun thing to do, will give it a try and update you with the outcome.