Skip to content

Commit

Permalink
Re-add system for updating parent
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Jul 24, 2023
1 parent a03663d commit 200167c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/geometry/collider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ pub struct ColliderDisabled;

/// Rigid body parent of the collider.
#[derive(Component, Debug, Eq, PartialEq, Reflect)]
#[reflect(Component, MapEntities, PartialEq)]
#[reflect(Component, PartialEq)]
pub struct ColliderParent(pub(crate) Entity);

impl ColliderParent {
Expand All @@ -524,13 +524,6 @@ impl FromWorld for ColliderParent {
}
}

impl MapEntities for ColliderParent {
fn map_entities(&mut self, entity_map: &EntityMap) -> Result<(), MapEntitiesError> {
self.0 = entity_map.get(self.0)?;
Ok(())
}
}

impl std::ops::Deref for ColliderParent {
type Target = Entity;

Expand Down
1 change: 1 addition & 0 deletions src/plugin/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ where
.after(systems::update_character_controls)
.in_set(RapierTransformPropagateSet),
systems::init_async_colliders.after(RapierTransformPropagateSet),
systems::collect_collider_hierarchy_changes,
systems::apply_scale.after(systems::init_async_colliders),
systems::apply_collider_user_changes.after(systems::apply_scale),
systems::apply_rigid_body_user_changes.after(systems::apply_collider_user_changes),
Expand Down

0 comments on commit 200167c

Please sign in to comment.