Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Time
inconsistency after substepping loop (#294)
# Objective There are currently two issues that cause `Time` to be inconsistent, even with a fixed timestep: 1. After the substepping loop, the `Time` resource is always set to `Time<Virtual>`. However, the `PhysicsSchedule` is still running. This means that systems running after substeps but before the end of the physics schedule will have a variable `Time`. 2. After the `PhysicsSchedule`, `Time` is set to `Time<Virtual>`. This means that if physics is run in `FixedUpdate`, the fixed timestep will be overwritten by `Time<Virtual>`. ## Solution 1. Set `Time` to `Time<Physics>` instead. The physics schedule will later set it to the default clock. 2. Set `Time` to the clock that was used before the `PhysicsSchedule`.
- Loading branch information