From 2e87fceae17adc002e9fda4ddab561746cb47f49 Mon Sep 17 00:00:00 2001 From: Schmarni Date: Thu, 19 Jun 2025 00:57:56 +0200 Subject: [PATCH] feat: disable controller methods if the interaction profile matches khr/simple_controller Signed-off-by: Schmarni --- src/objects/input/sk_controller.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/objects/input/sk_controller.rs b/src/objects/input/sk_controller.rs index 086192e..d953ece 100644 --- a/src/objects/input/sk_controller.rs +++ b/src/objects/input/sk_controller.rs @@ -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( session: &OxrSession, path: openxr::Path,