feat: disable controller methods if the interaction profile matches khr/simple_controller
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -135,6 +135,16 @@ fn suggest_bindings(
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
bind_all(
|
||||||
|
"/interaction_profiles/khr/simple_controller",
|
||||||
|
&[(
|
||||||
|
actions.space.as_raw(),
|
||||||
|
&[
|
||||||
|
"/user/hand/left/input/aim/pose",
|
||||||
|
"/user/hand/right/input/aim/pose",
|
||||||
|
],
|
||||||
|
)],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update(
|
fn update(
|
||||||
@@ -360,6 +370,13 @@ impl SkController {
|
|||||||
HandSide::Right => "/user/hand/right",
|
HandSide::Right => "/user/hand/right",
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
if let Ok(path) = session.current_interaction_profile(path) {
|
||||||
|
if session.instance().path_to_string(path).unwrap()
|
||||||
|
== "/interaction_profiles/khr/simple_controller"
|
||||||
|
{
|
||||||
|
self.set_enabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
fn get<T: openxr::ActionInput + Default>(
|
fn get<T: openxr::ActionInput + Default>(
|
||||||
session: &OxrSession,
|
session: &OxrSession,
|
||||||
path: openxr::Path,
|
path: openxr::Path,
|
||||||
|
|||||||
Reference in New Issue
Block a user