From 6e8cc4c5ea6af071210ab91710f6f5fb5e5d3d04 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 4 Aug 2021 15:52:28 -0500 Subject: [PATCH] Move sync after transforms are synced to ensure values are accurate. --- src/lib.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d73897b..94ec850 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,6 +15,7 @@ use bevy::{ asset::{AssetLoader, HandleId, LoadContext, LoadedAsset}, prelude::*, reflect::TypeUuid, + transform::TransformSystem, utils::BoxedFuture, }; use lewton::inside_ogg::OggStreamReader; @@ -475,7 +476,17 @@ impl Plugin for OpenAlPlugin { .insert_resource(GlobalEffects::default()) .register_type::() .add_system(buffer_creation.system()) - .add_system(source_update.system()) - .add_system(listener_update.system()); + .add_system_to_stage( + CoreStage::PostUpdate, + source_update + .system() + .after(TransformSystem::TransformPropagate), + ) + .add_system_to_stage( + CoreStage::PostUpdate, + listener_update + .system() + .after(TransformSystem::TransformPropagate), + ); } }