grab, mouse move

This commit is contained in:
galister
2023-12-08 19:41:41 +01:00
parent a3b60b9607
commit 1842259e66
7 changed files with 35 additions and 27 deletions

View File

@@ -200,7 +200,7 @@ impl InputState<OpenVrInputState, OpenVrHandState> {
hand.now.scroll = input
.get_analog_action_data(self.data.scroll_hnd, hand.data.input_hnd)
.map(|x| x.0.x)
.map(|x| x.0.y)
.unwrap_or(0.0);
}

View File

@@ -55,6 +55,8 @@ pub fn openvr_run() {
let mut state = AppState::new(instance_extensions, device_extensions_fn);
let mut overlays = OverlayContainer::<OpenVrOverlayData>::new(&mut state);
state.input.set_desktop_extent(overlays.extent);
if let Err(e) = input_mngr.set_action_manifest(action_manifest_path()) {
log::error!("Failed to set action manifest: {}", e.description());
return;