feat: disable controller methods if the interaction profile matches khr/simple_controller

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-06-19 00:57:56 +02:00
parent 6977fee10b
commit 51e8cfd1b2

View File

@@ -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(
@@ -360,6 +370,13 @@ impl SkController {
HandSide::Right => "/user/hand/right",
})
.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>(
session: &OxrSession,
path: openxr::Path,