simplify ordering with chain

This commit is contained in:
Aevyrie Roessler 2023-03-28 20:28:55 -07:00
parent 56dff7ebbe
commit 66d8e2fce8

View File

@ -135,18 +135,20 @@ impl<P: GridPrecision> Plugin for FloatingOriginPlugin<P> {
// add transform systems to startup so the first update is "correct"
.add_startup_systems(
(
recenter_transform_on_grid::<P>.before(update_global_from_grid::<P>),
update_global_from_grid::<P>.before(transform_propagate_system::<P>),
recenter_transform_on_grid::<P>,
update_global_from_grid::<P>,
transform_propagate_system::<P>,
)
.chain()
.in_set(TransformSystem::TransformPropagate),
)
.add_systems(
(
recenter_transform_on_grid::<P>.before(update_global_from_grid::<P>),
update_global_from_grid::<P>.before(transform_propagate_system::<P>),
recenter_transform_on_grid::<P>,
update_global_from_grid::<P>,
transform_propagate_system::<P>,
)
.chain()
.in_set(TransformSystem::TransformPropagate),
);
}