bevy_transform_interpolation

Function reset_easing_states_on_transform_change

source
pub fn reset_easing_states_on_transform_change(
    query: Query<'_, '_, (Ref<'_, Transform>, Option<&mut TranslationEasingState>, Option<&mut RotationEasingState>, Option<&mut ScaleEasingState>), (Changed<Transform>, Or<(With<TranslationEasingState>, With<RotationEasingState>, With<ScaleEasingState>)>)>,
    last_easing_tick: Res<'_, LastEasingTick>,
    system_change_tick: SystemChangeTick,
)
Expand description

Resets the easing states to None when Transform is modified outside of the fixed timestep schedules or interpolation logic. This makes it possible to “teleport” entities in schedules like Update.