Skip to content

Commit

Permalink
Rebased on main
Browse files Browse the repository at this point in the history
  • Loading branch information
ManevilleF committed Dec 2, 2023
1 parent cedf2ce commit 7757759
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@

### Fixes

* Fixed visibility issues with cloths. Now the `Aabb` is directly handled by the cloth engine.
* Fixed visibility issues with cloths. Now the `Aabb` is directly handled by
the cloth engine.

### bevy_inspector_egui

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,27 +325,27 @@ in `ClothConfig::acceleration_smoothing`.

1. Flag example

run `cargo run --example flag`
run `cargo run --example flag`

2. Balloon example

run `cargo run --example balloon`
run `cargo run --example balloon`

3. Moving example

run `cargo run --example moving`
run `cargo run --example moving`

4. [`bevy_rapier`] collision example

run `cargo run --example rapier_collision --features rapier_collisions`
run `cargo run --example rapier_collision --features rapier_collisions`

5. [`bevy_xpbd`] collision example

run `cargo run --example xpbd_collision --features xpbd_collisions`
run `cargo run --example xpbd_collision --features xpbd_collisions`

6. Anchors example

run `cargo run --example anchors`
run `cargo run --example anchors`

[`bevy_rapier`]: https://github.com/dimforge/bevy_rapier
[`bevy_xpbd`]: https://github.com/Jondolf/bevy_xpbd
20 changes: 6 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,21 +372,13 @@ impl Plugin for ClothPlugin {
);

#[cfg(feature = "rapier_collisions")]
app.register_type::<ClothCollider>().add_systems(
Update,
(
systems::collisions::rapier::init_cloth_collider,
systems::collisions::rapier::handle_collisions.before(systems::cloth::render),
),
);
app.register_type::<ClothCollider>()
.add_systems(Update, systems::collisions::rapier::init_cloth_collider)
.add_systems(FixedUpdate, systems::collisions::rapier::handle_collisions);
#[cfg(feature = "xpbd_collisions")]
app.register_type::<ClothCollider>().add_systems(
Update,
(
systems::collisions::xpbd::init_cloth_collider,
systems::collisions::xpbd::handle_collisions.before(systems::cloth::render),
),
);
app.register_type::<ClothCollider>()
.add_systems(Update, systems::collisions::xpbd::init_cloth_collider)
.add_systems(FixedUpdate, systems::collisions::xpbd::handle_collisions);
bevy::log::info!("Loaded Cloth Plugin");
}
}

0 comments on commit 7757759

Please sign in to comment.