From 33cd8934500671427d07585586bda52f5ef2fc17 Mon Sep 17 00:00:00 2001 From: Jan Hohenheim Date: Fri, 11 Jul 2025 20:58:01 +0200 Subject: [PATCH] Add reasoning --- examples/movement/physics_in_fixed_timestep.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/movement/physics_in_fixed_timestep.rs b/examples/movement/physics_in_fixed_timestep.rs index 2713090edc..31aafbe3eb 100644 --- a/examples/movement/physics_in_fixed_timestep.rs +++ b/examples/movement/physics_in_fixed_timestep.rs @@ -124,6 +124,7 @@ fn main() { .in_set(RunFixedMainLoopSystems::BeforeFixedMainLoop), ( // Clear our accumulated input after it was processed during the fixed timestep. + // By clearing the input *after* the fixed timestep, we can still use `AccumulatedInput` inside `FixedUpdate` if we need it. clear_input.run_if(did_fixed_timestep_run_this_frame), // The player's visual representation needs to be updated after the physics simulation has been advanced. // This could be run in `Update`, but if we run it here instead, the systems in `Update`