fixed merge conflicts

This commit is contained in:
Schmarni
2023-11-16 03:09:42 +01:00
21 changed files with 2869 additions and 387 deletions

View File

@@ -5,10 +5,11 @@ use bevy::{
ecs::schedule::ScheduleLabel,
log::info,
prelude::{
default, shape, App, Assets, Color, Commands, Component, Entity, Event, EventReader,
EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs, IntoSystemSetConfigs,
Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource, Schedule, SpatialBundle,
StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles, With, Without, World, bevy_main,
bevy_main, default, shape, App, Assets, Color, Commands, Component, Entity, Event,
EventReader, EventWriter, FixedUpdate, Gizmos, GlobalTransform, IntoSystemConfigs,
IntoSystemSetConfigs, Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource,
Schedule, SpatialBundle, StandardMaterial, Startup, Transform, Update, Vec3, Vec3Swizzles,
With, Without, World,
},
time::{Fixed, Time, Timer},
transform::TransformSystem,
@@ -284,10 +285,8 @@ fn spawn_physics_hands(mut commands: Commands) {
let right_hand_membership_group = Group::GROUP_2;
let floor_membership = Group::GROUP_3;
for hand in hands.iter() {
let hand_membership = match hand
{
let hand_membership = match hand {
Hand::Left => left_hand_membership_group,
Hand::Right => right_hand_membership_group,
};
@@ -518,13 +517,14 @@ fn request_cube_spawn(
mut writer: EventWriter<SpawnCubeRequest>,
time: Res<Time>,
mut timer: ResMut<SpawnCubeTimer>,
action_sets: Res<XrActionSets>,
) {
timer.0.tick(time.delta());
if timer.0.finished() {
//lock frame
let frame_state = *frame_state.lock().unwrap();
//get controller
let controller = oculus_controller.get_ref(&instance, &session, &frame_state, &xr_input);
let controller = oculus_controller.get_ref(&session, &frame_state, &xr_input, &action_sets);
//get controller triggers
let left_main_button = controller.a_button();
if left_main_button {
@@ -570,7 +570,6 @@ fn prototype_interaction_input(
oculus_controller: Res<OculusController>,
frame_state: Res<XrFrameState>,
xr_input: Res<XrInput>,
instance: Res<XrInstance>,
session: Res<XrSession>,
mut right_interactor_query: Query<
(&mut XRInteractorState),
@@ -588,11 +587,12 @@ fn prototype_interaction_input(
Without<OpenXRRightController>,
),
>,
action_sets: Res<XrActionSets>,
) {
//lock frame
let frame_state = *frame_state.lock().unwrap();
//get controller
let controller = oculus_controller.get_ref(&instance, &session, &frame_state, &xr_input);
let controller = oculus_controller.get_ref(&session, &frame_state, &xr_input, &action_sets);
//get controller triggers
let left_trigger = controller.trigger(Hand::Left);
let right_trigger = controller.trigger(Hand::Right);