dimforge / dimforge/bevy_rapier
Follow ups to bevy 0.16
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Description
bevy 0.16 support from https://github.com/dimforge/bevy_rapier/pull/642 left out a few important things:
- [x] bevy_mod_debugdump is targeting git, we should target the crate when it's released
- [ ] ambiguity detection is failing on a new ambiguity:
- a fix can be to add `.ambiguous_with(bevy::ui::ui_layout_system)` on `sync_simple_transforms` and `propagate_parent_transforms` ; but further analysis on why this happen and if we can do better would be appreciated.
Patch attempt for ambiguity
This is not enough because we're not sure if bevy ui is in the tree. We could fix it by adding a feature... 🤔 ; but I imagine we should make the propagation more clever...
```diff
commit 9f87d5ff64363549e602833a78b39d266bbc6ae0
Author: Thierry Berger
Date: Fri May 9 09:52:06 2025 +0200
fix ambiguities
diff --git a/ci/src/bin/ambiguity_detection.rs b/ci/src/bin/ambiguity_detection.rs
index 18c2964..11b5be8 100644
--- a/ci/src/bin/ambiguity_detection.rs
+++ b/ci/src/bin/ambiguity_detection.rs
@@ -19,7 +19,6 @@ fn main() {
bevy_rapier3d::prelude::RapierPickingPlugin,
),
true,
- 2,
);
check_ambiguities(
(
@@ -27,7 +26,6 @@ fn main() {
bevy_rapier3d::prelude::RapierPickingPlugin,
),
false,
- 0,
);
check_ambiguities(
(
@@ -35,7 +33,6 @@ fn main() {
bevy_rapier3d::prelude::RapierPickingPlugin,
),
false,
- 0,
);
check_ambiguities(
(
@@ -43,11 +40,10 @@ fn main() {
bevy_rapier3d::prelude::RapierPickingPlugin,
),
false,
- 0,
);
}
-fn check_ambiguities(plugin: impl Plugins, set_logger: bool, ambiguities_expected: usize) {
+fn check_ambiguities(plugin: impl Plugins, set_logger: bool) {
let mut app = App::new();
app.add_plugins((MinimalPlugins, TransformPlugin, AssetPlugin::default()));
if set_logger {
@@ -65,8 +61,7 @@ fn check_ambiguities(plugin: impl Plugins, set_logger: bool, ambiguities_e
let main_app_ambiguities = count_ambiguities(app.main());
assert_eq!(
main_app_ambiguities.total(),
- // FIXME: We should find those ambiguity and fix it, this should be 0
- ambiguities_expected,
+ 0,
"Main app has unexpected ambiguities among the following schedules: \n{main_app_ambiguities:#?}.",
);
}
@@ -102,7 +97,7 @@ fn count_ambiguities(sub_app: &SubApp) -> AmbiguitiesCount {
info!("Conflicting systems: {system_a:?} and {system_b:?} over components:");
for component in components {
let component_info = sub_app.world().components().get_info(*component).unwrap();
- info!("{}", component_info.name());
+ info!("{:?}: {}", component_info.id(), component_info.name());
}
},
);
diff --git a/src/plugin/plugin.rs b/src/plugin/plugin.rs
index 7191e78..9f00793 100644
--- a/src/plugin/plugin.rs
+++ b/src/plugin/plugin.rs
@@ -136,8 +136,10 @@ where
.in_set(PhysicsSet::SyncBackend),
// Run Bevy transform propagation additionally to sync [`GlobalTransform`]
(
- bevy::transform::systems::sync_simple_transforms,
- bevy::transform::systems::propagate_parent_transforms,
+ bevy::transform::systems::sync_simple_transforms
+ .ambiguous_with(bevy::ui::ui_layout_system),
+ bevy::transform::systems::propagate_parent_transforms
+ .ambiguous_with(bevy::ui::ui_layout_system),
)
.chain()
.in_set(RapierTransformPropagateSet),
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.