fixed up example to be clean, and added head space to xr input

This commit is contained in:
MalekiRe
2023-09-11 18:54:00 -07:00
parent 4da61df223
commit 4d36ddf9c4
2 changed files with 14 additions and 29 deletions

View File

@@ -12,6 +12,7 @@ pub struct XrInput {
//pub right_space: Arc<xr::Space>,
//pub left_space: Arc<xr::Space>,
pub stage: Arc<xr::Space>,
pub head: Arc<xr::Space>,
}
impl XrInput {
@@ -52,6 +53,9 @@ impl XrInput {
// )?;
let stage =
session.create_reference_space(xr::ReferenceSpaceType::STAGE, xr::Posef::IDENTITY)?;
let head =
session.create_reference_space(xr::ReferenceSpaceType::VIEW, xr::Posef::IDENTITY)
.unwrap();
//session.attach_action_sets(&[&action_set])?;
//session.attach_action_sets(&[])?;
Ok(Self {
@@ -60,6 +64,7 @@ impl XrInput {
// right_space: Arc::new(right_space),
// left_space: Arc::new(left_space),
stage: Arc::new(stage),
head: Arc::new(head),
})
}
}