Run systems in with a fixed timestep
Bevy version: 0.16Last updated:
Use the FixedUpdate
schedule.
fn main() {
App::new().add_systems(FixedUpdate, hello_world);
}
The FixedUpdate
schedule will keep track of the total time elapsed and run your system after enough time has accumulated.
This schedule runs at 64hz
by default.
Systems scheduled in FixedUpdate
will receive a Time<Fixed>
instead of a Time<Virtual>
when you ask for the Res<Time>
as a system parameter.
This can cause some issues during testing. Simply having your world update itself will not advance the time this schedule keeps track of. So in many cases during tests rescheduling your systems to run on update can be helpful.