From 1f016501f3c8747670cc9ff25d0fde5abe71e7f7 Mon Sep 17 00:00:00 2001 From: ForTehLose Date: Tue, 3 Sep 2024 15:20:13 -0400 Subject: [PATCH] small fixes --- crates/bevy_openxr/examples/common_entities.rs | 10 +--------- crates/bevy_xr_utils/src/tracking_utils.rs | 3 +++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/crates/bevy_openxr/examples/common_entities.rs b/crates/bevy_openxr/examples/common_entities.rs index be14890..668b42d 100644 --- a/crates/bevy_openxr/examples/common_entities.rs +++ b/crates/bevy_openxr/examples/common_entities.rs @@ -35,13 +35,6 @@ fn setup( transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)), ..default() }); - // // cube - // commands.spawn(PbrBundle { - // mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)), - // material: materials.add(Color::srgb_u8(124, 144, 255)), - // transform: Transform::from_xyz(0.0, 0.5, 0.0), - // ..default() - // }); // light commands.spawn(PointLightBundle { point_light: PointLight { @@ -59,7 +52,6 @@ fn setup( fn spawn_hands( mut cmds: Commands, - root: Query>, mut meshes: ResMut>, mut materials: ResMut>, ) { @@ -122,6 +114,6 @@ fn spawn_hands( )) .id(); - cmds.entity(root.single()) + cmds.entity(rooter) .push_children(&[left, right, head, local_floor]); } diff --git a/crates/bevy_xr_utils/src/tracking_utils.rs b/crates/bevy_xr_utils/src/tracking_utils.rs index 00f6a77..7bb22b0 100644 --- a/crates/bevy_xr_utils/src/tracking_utils.rs +++ b/crates/bevy_xr_utils/src/tracking_utils.rs @@ -268,6 +268,9 @@ fn spawn_tracking_rig( let right = cmds .spawn((SpatialBundle { ..default() }, right_space, RightGrip)) .id(); + + cmds.entity(root.single()) + .push_children(&[head, local_floor, left, right]); } //bindings