diff --git a/crates/bevy_time/src/fixed.rs b/crates/bevy_time/src/fixed.rs index f1c67ea4a0ca9..13f1590b33a95 100644 --- a/crates/bevy_time/src/fixed.rs +++ b/crates/bevy_time/src/fixed.rs @@ -10,7 +10,7 @@ use crate::{time::Time, virt::Virtual}; /// /// A specialization of the [`Time`] structure. **For method documentation, see /// [`Time#impl-Time`].** -/// +/// /// It is automatically inserted as a resource by /// [`TimePlugin`](crate::TimePlugin) and updated based on /// [`Time`](Virtual). The fixed clock is automatically set as the diff --git a/crates/bevy_time/src/lib.rs b/crates/bevy_time/src/lib.rs index 3d515597ac6e8..d4c8d67806a37 100644 --- a/crates/bevy_time/src/lib.rs +++ b/crates/bevy_time/src/lib.rs @@ -118,6 +118,9 @@ pub enum TimeUpdateStrategy { ManualInstant(Instant), /// [`Time`] will be incremented by the specified [`Duration`] each frame. ManualDuration(Duration), + /// [`Time`] will be incremented by the fixed timestep each frame, multiplied by the specified factor `n`. + /// This means that a call to [`App::update`] will always run the fixed loop exactly n times. + FixedTimesteps(u32), } /// Channel resource used to receive time from the render world. @@ -144,6 +147,7 @@ pub fn create_time_channels() -> (TimeSender, TimeReceiver) { pub fn time_system( mut real_time: ResMut>, mut virtual_time: ResMut>, + fixed_time: Res>, mut time: ResMut