feat: flatscreen only mode when passing --flatscreen or -f

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-06-30 13:13:48 +02:00
parent 3a91ce8158
commit 165dc1d259
5 changed files with 14 additions and 48 deletions

View File

@@ -60,7 +60,7 @@ impl Plugin for ControllerPlugin {
);
app.add_systems(XrPreDestroySession, destroy_spaces);
app.add_systems(Startup, setup.run_if(resource_exists::<OxrInstance>));
app.add_systems(PreFrameWait, update);
app.add_systems(PreFrameWait, update.run_if(resource_exists::<Controllers>));
}
}

View File

@@ -31,7 +31,7 @@ use super::{CaptureManager, get_sorted_handlers};
pub struct HandPlugin;
impl Plugin for HandPlugin {
fn build(&self, app: &mut App) {
app.add_systems(PreFrameWait, update_hands);
app.add_systems(PreFrameWait, update_hands.run_if(resource_exists::<Hands>));
app.add_systems(XrSessionCreated, create_trackers);
app.add_systems(XrPreDestroySession, destroy_trackers);
app.add_systems(PostUpdate, update_hand_material);