-
Notifications
You must be signed in to change notification settings - Fork 5
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 support for bevy_xpbd
#22
Conversation
Thanks for your contribution, should I merge #21 first ? And then you'll rebase? |
use bevy_xpbd_3d::prelude::*; | ||
|
||
fn get_collider(aabb: &Aabb, collider: &ClothCollider) -> Collider { | ||
let extents = aabb.half_extents * 2.0 + collider.offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the * 2.0 needed? We don't do that in rapier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collider::cuboid
currently takes full extents to match Bevy's shape APIs better
Yeah, you can merge that one first. I'll fix the format warning here and add these changes to the changelog as well, and then rebase |
Btw to synchronize the README and lib.rs I use cargo-sync-readme |
Depends on #21; merge that first.
This PR adds support for
bevy_xpbd
as an alternative physics backend.Changes
xpbd_collisions
featurerapier
andxpbd
sub-modules forcollisions
xpbd_collision
example; a clone ofrapier_example
, but modified forbevy_xpbd
README.md
andsrc/lib.rs
to have separate sections forbevy_rapier
andbevy_xpbd
. If you'd like it to be changed more, let me know :)