From 77577590379e1d17d5398432ec440fc1f3f940be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Lescaudey=20de=20Maneville?= Date: Sat, 2 Dec 2023 11:54:20 +0100 Subject: [PATCH] Rebased on main --- CHANGELOG.md | 3 ++- README.md | 12 ++++++------ src/lib.rs | 20 ++++++-------------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aebacc5..dad997c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 57480b5..14806f9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/lib.rs b/src/lib.rs index ef9989a..b7102dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -372,21 +372,13 @@ impl Plugin for ClothPlugin { ); #[cfg(feature = "rapier_collisions")] - app.register_type::().add_systems( - Update, - ( - systems::collisions::rapier::init_cloth_collider, - systems::collisions::rapier::handle_collisions.before(systems::cloth::render), - ), - ); + app.register_type::() + .add_systems(Update, systems::collisions::rapier::init_cloth_collider) + .add_systems(FixedUpdate, systems::collisions::rapier::handle_collisions); #[cfg(feature = "xpbd_collisions")] - app.register_type::().add_systems( - Update, - ( - systems::collisions::xpbd::init_cloth_collider, - systems::collisions::xpbd::handle_collisions.before(systems::cloth::render), - ), - ); + app.register_type::() + .add_systems(Update, systems::collisions::xpbd::init_cloth_collider) + .add_systems(FixedUpdate, systems::collisions::xpbd::handle_collisions); bevy::log::info!("Loaded Cloth Plugin"); } }