diff --git a/src/lib.rs b/src/lib.rs index eaef804..823caf1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ #![allow(clippy::type_complexity)] use bevy::prelude::*; +#[cfg(all(feature = "xr", not(target_os = "macos")))] use bevy_oxr::xr_input::trackers::OpenXRTrackingRoot; type TileMap = tilemap::TileMap<8145>; @@ -54,6 +55,11 @@ fn setup(mut commands: Commands, mut meshes: ResMut>) { /// Used to make sure all players have a map to walk on. pub struct LocalPlayer; +#[cfg(not(all(feature = "xr", not(target_os = "macos"))))] +/// HACK: we can't attach `LocalPlayer` to the xr player yet, so we need +/// to access the OpenXRTrackingRoot, but that doesn't exist without the xr feature +type OpenXRTrackingRoot = LocalPlayer; + fn update_active_tile_zone( mut commands: Commands, mut tilemap: Query<