This commit is contained in:
Schmarni
2024-01-14 00:15:14 +01:00
parent aae751bdab
commit cbf9485bb7
11 changed files with 224 additions and 164 deletions

View File

@@ -50,7 +50,6 @@ fn input_stuff(
match status.into_inner() {
XrEnableStatus::Enabled => request.send(XrEnableRequest::TryDisable),
XrEnableStatus::Disabled => request.send(XrEnableRequest::TryEnable),
XrEnableStatus::Waiting => (),
}
}
}

View File

@@ -172,8 +172,7 @@ fn pull_to_ground(
let (globe_pos, globe) = globe.single();
// Get player position (position of playground + position within playground)
let v = views.lock().unwrap();
let Some(view) = v.get(0) else { return };
let Some(view) = views.first() else { return };
let mut hmd_translation = view.pose.position.to_vec3();
hmd_translation.y = 0.0;
let local = root.translation;

View File

@@ -167,8 +167,6 @@ fn prototype_interaction_input(
>,
action_sets: Res<XrActionSets>,
) {
//lock frame
let frame_state = *frame_state.lock().unwrap();
//get controller
let controller = oculus_controller.get_ref(&session, &frame_state, &xr_input, &action_sets);
//get controller triggers