cargo fmt and removed the unessecary examples.
This commit is contained in:
@@ -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()
|
||||
});
|
||||
|
||||
@@ -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!");
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
pub mod handtracking;
|
||||
#[cfg(feature = "passthrough")]
|
||||
pub mod passthrough;
|
||||
pub mod handtracking;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user