small fixes
This commit is contained in:
@@ -35,13 +35,6 @@ fn setup(
|
|||||||
transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
transform: Transform::from_rotation(Quat::from_rotation_x(-std::f32::consts::FRAC_PI_2)),
|
||||||
..default()
|
..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
|
// light
|
||||||
commands.spawn(PointLightBundle {
|
commands.spawn(PointLightBundle {
|
||||||
point_light: PointLight {
|
point_light: PointLight {
|
||||||
@@ -59,7 +52,6 @@ fn setup(
|
|||||||
|
|
||||||
fn spawn_hands(
|
fn spawn_hands(
|
||||||
mut cmds: Commands,
|
mut cmds: Commands,
|
||||||
root: Query<Entity, With<XrTrackingRoot>>,
|
|
||||||
mut meshes: ResMut<Assets<Mesh>>,
|
mut meshes: ResMut<Assets<Mesh>>,
|
||||||
mut materials: ResMut<Assets<StandardMaterial>>,
|
mut materials: ResMut<Assets<StandardMaterial>>,
|
||||||
) {
|
) {
|
||||||
@@ -122,6 +114,6 @@ fn spawn_hands(
|
|||||||
))
|
))
|
||||||
.id();
|
.id();
|
||||||
|
|
||||||
cmds.entity(root.single())
|
cmds.entity(rooter)
|
||||||
.push_children(&[left, right, head, local_floor]);
|
.push_children(&[left, right, head, local_floor]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,6 +268,9 @@ fn spawn_tracking_rig(
|
|||||||
let right = cmds
|
let right = cmds
|
||||||
.spawn((SpatialBundle { ..default() }, right_space, RightGrip))
|
.spawn((SpatialBundle { ..default() }, right_space, RightGrip))
|
||||||
.id();
|
.id();
|
||||||
|
|
||||||
|
cmds.entity(root.single())
|
||||||
|
.push_children(&[head, local_floor, left, right]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//bindings
|
//bindings
|
||||||
|
|||||||
Reference in New Issue
Block a user