Open
Description
What problem does this solve or what need does it fill?
The purpose of FixedUpdate
and fixed timesteps in general is to improve determinism in systems, but any fixed update system relying on GlobalTransform
will currently suffer from a lack of determinism if it runs multiple times in 1 frame.
What solution would you like?
GlobalTransform
should be updated between fixed updates.
What alternative(s) have you considered?
Games could add these systems to FixedUpdate
themselves. It's actually fairly easy to do already.
use bevy::{
prelude::*,
transform::systems::{propagate_transforms, sync_simple_transforms},
};
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)]
pub enum FixedTransformSystem {
TransformPropagate,
}
// ...
app.add_system_to_schedule(
CoreSchedule::FixedUpdate,
sync_simple_transforms.in_set(FixedTransformSystem::TransformPropagate),
)
.add_system_to_schedule(
CoreSchedule::FixedUpdate,
propagate_transforms.in_set(FixedTransformSystem::TransformPropagate),
);