Skip to content

Commit c981ecd

Browse files
authored
Do not use FixedUpdate on breakout (#23709)
# Objective The aim is to simplify the example somewhat. This also removes the jitter that some experience when running the example. Fixes #14239 Fixes #2349 ## Solution Use `Update` instead of `FixedUpdate` schedule. ## Testing ```sh cargo run --example breakout ``` and ```sh cargo run --features bevy_debug_stepping --example breakout ```
1 parent 8f251ff commit c981ecd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

examples/showcase/breakout.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ fn main() {
5656
.add_plugins(
5757
stepping::SteppingPlugin::default()
5858
.add_schedule(Update)
59-
.add_schedule(FixedUpdate)
6059
.at(percent(35), percent(50)),
6160
)
6261
.insert_resource(Score(0))
6362
.insert_resource(ClearColor(BACKGROUND_COLOR))
6463
.add_systems(Startup, setup)
65-
// Add our gameplay simulation systems to the fixed timestep schedule
66-
// which runs at 64 Hz by default
64+
// Add our simulation systems to the update schedule
65+
// which is called once per frame.
6766
.add_systems(
68-
FixedUpdate,
67+
Update,
6968
(apply_velocity, move_paddle, check_for_collisions)
7069
// `chain`ing systems together runs them in order
7170
.chain(),

0 commit comments

Comments
 (0)