Skip to content

Commit

Permalink
Remove apply_deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Feb 2, 2024
1 parent 3658054 commit bbd0b2b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ impl Plugin for CharacterControllerPlugin {
keyboard_input,
gamepad_input,
update_grounded,
apply_deferred,
movement,
apply_movement_damping,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ impl Plugin for CharacterControllerPlugin {
keyboard_input,
gamepad_input,
update_grounded,
apply_deferred,
apply_gravity,
movement,
apply_movement_damping,
Expand Down
1 change: 0 additions & 1 deletion crates/bevy_xpbd_2d/examples/sensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ fn main() {
(
keyboard_input1,
keyboard_input2,
apply_deferred,
movement.run_if(has_movement), // don't mutably access the character if there is no movement
apply_movement_damping,
apply_pressure_plate_colour,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ impl Plugin for CharacterControllerPlugin {
keyboard_input,
gamepad_input,
update_grounded,
apply_deferred,
movement,
apply_movement_damping,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ impl Plugin for CharacterControllerPlugin {
keyboard_input,
gamepad_input,
update_grounded,
apply_deferred,
apply_gravity,
movement,
apply_movement_damping,
Expand Down
21 changes: 5 additions & 16 deletions src/plugins/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,13 @@ impl Plugin for PreparePlugin {
.register_type::<PrepareConfig>()
.add_systems(
self.schedule,
// Run transform propagation if new bodies or colliders have been added
(
apply_deferred,
// Run transform propagation if new bodies or colliders have been added
(
bevy::transform::systems::sync_simple_transforms,
bevy::transform::systems::propagate_transforms,
)
.chain()
.run_if(any_new_physics_entities),
bevy::transform::systems::sync_simple_transforms,
bevy::transform::systems::propagate_transforms,
)
.chain()
.run_if(any_new_physics_entities)
.in_set(PrepareSet::PropagateTransforms),
)
.add_systems(
Expand All @@ -126,12 +122,7 @@ impl Plugin for PreparePlugin {
)
.add_systems(
self.schedule,
(
init_colliders,
apply_deferred,
update_collider_parents,
apply_deferred,
)
(init_colliders, update_collider_parents)
.chain()
.in_set(PrepareSet::InitColliders),
)
Expand All @@ -151,8 +142,6 @@ impl Plugin for PreparePlugin {
update_mass_properties,
clamp_collider_density,
clamp_restitution,
// All the components we added above must exist before we can simulate the bodies.
apply_deferred,
)
.chain()
.in_set(PrepareSet::Finalize),
Expand Down

0 comments on commit bbd0b2b

Please sign in to comment.