cargo fmt and removed the unessecary examples.

This commit is contained in:
MalekiRe
2024-05-29 16:30:15 -07:00
committed by Malek
parent 1d27157142
commit ec16d9a254
13 changed files with 59 additions and 72 deletions

View File

@@ -39,7 +39,8 @@ fn setup(
},
transform: Transform::from_xyz(4.0, 8.0, 4.0),
..default()
}); commands.spawn(Camera3dBundle {
});
commands.spawn(Camera3dBundle {
transform: Transform::from_xyz(-2.5, 4.5, 9.0).looking_at(Vec3::ZERO, Vec3::Y),
..default()
});

View File

@@ -14,10 +14,14 @@ impl Plugin for OxrActionAttachingPlugin {
fn attach_sets(session: Res<OxrSession>, mut events: EventReader<OxrAttachActionSet>) {
let sets = events.read().map(|v| &v.0).collect::<Vec<_>>();
if sets.is_empty() {return;}
if sets.is_empty() {
return;
}
info!("attaching {} sessions", sets.len());
match session.attach_action_sets(&sets) {
Ok(_) => {info!("attached sessions!")}
Ok(_) => {
info!("attached sessions!")
}
Err(openxr::sys::Result::ERROR_ACTIONSETS_ALREADY_ATTACHED) => {
error!("Action Sets Already attached!");
}

View File

@@ -1,3 +1,3 @@
pub mod handtracking;
#[cfg(feature = "passthrough")]
pub mod passthrough;
pub mod handtracking;

View File

@@ -17,6 +17,7 @@ use self::{
pub mod action_binding;
pub mod action_set_attaching;
pub mod action_set_syncing;
pub mod error;
mod exts;
pub mod features;
@@ -28,7 +29,6 @@ pub mod reference_space;
pub mod render;
pub mod resources;
pub mod types;
pub mod action_set_syncing;
pub fn add_xr_plugins<G: PluginGroup>(plugins: G) -> PluginGroupBuilder {
plugins

View File

@@ -10,14 +10,17 @@ use bevy::{
},
transform::TransformSystem,
};
use bevy_xr::{camera::{XrCamera, XrCameraBundle, XrProjection}, session::session_running};
use bevy_xr::{
camera::{XrCamera, XrCameraBundle, XrProjection},
session::session_running,
};
use openxr::ViewStateFlags;
use crate::{reference_space::OxrPrimaryReferenceSpace, resources::*};
use crate::{
init::{session_started, OxrPreUpdateSet, OxrTrackingRoot},
layer_builder::ProjectionLayer,
};
use crate::{reference_space::OxrPrimaryReferenceSpace, resources::*};
pub struct OxrRenderPlugin;