-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add bevy_xpbd_2d_f64
and bevy_xpbd_3d_f64
crates
#7
Conversation
bevy_xpbd_2d_f64
cratebevy_xpbd_2d_f64
and bevy_xpbd_3d_f64
crates
We should definitely make I'm not entirely sure what the best approach would be, but intuitively I'd say that we should just add an With this approach we probably won't be able to have examples where you can choose the type, so we would either have to choose a default (probably |
cargo features are supposed to be additive, the reasoning being that if something depends on If that feature is However, I'm not sure how common this scenario would be, but that's why I felt it was kind of "dirty" to have it be the same crate. Same reason why 2d and 3d are different crates, no? But yeah, probably will be simpler to have it just in one crate, maybe it's better at a starting point, then we can see how common of a problem this would be. From my experiments with increased number of substeps (low sub-dt), though |
Yeah, I can understand the feature additivity argument as well. Simultaneously having one physics world based on I was also on the fence regarding 2D and 3D, but ended up making them into separate crates since it felt like there was a decently large and concrete difference in both implementation and usage. Also, it made it easy to make separate 2D and 3D examples. I'm still not entirely sure which approach is better though; both have their pros and cons. |
Yeah, lets go with only two crates for now. |
By the way, this seems to break the examples, since there are 2 executables for each example, one for |
Yeah, i made two of the examples work on both kinds of precision, by using the Vector and Scalar types, but they are worse examples aa a result (cubes and move_marbles) |
Closing in favor of #20 |
Had a go at making crates with different precision levels, since it seems there are good reasons to prefer
f64
.What do you think? It adds a bit of complexity to the crate, though... perhaps it's better to just scrap the f32 versions, like in @Aceeri's https://github.com/Jondolf/bevy_xpbd/compare/main...Aceeri:bevy_xpbd:doubles?expand=1 ?