From a5bbd536ca91ab84efa58bd3ac3084ae91cbc84e Mon Sep 17 00:00:00 2001 From: itycodes Date: Wed, 16 Apr 2025 01:31:54 +0200 Subject: [PATCH] Fix mistakes in movement code Additional zero, plus inverted y --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f22341d..7378acb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1207,7 +1207,7 @@ fn main() { // the center of the window and hidden) if mouse.relative_mouse_mode() => { camera.rotation.y -= xrel as f32 * ROT_MOUSE_SCALE; - camera.rotation.x += yrel as f32 * ROT_MOUSE_SCALE; + camera.rotation.x -= yrel as f32 * ROT_MOUSE_SCALE; mouse.warp_mouse_in_window(&window, width as i32 / 2, height as i32 / 2); } _ => {} @@ -1259,7 +1259,7 @@ fn main() { queue_present(&swapchain_loader, &queue, &swapchain, img_inx, &sem_finish); let elapsed = now.elapsed(); - let delay = (1000_0000u128 / 240).saturating_sub(elapsed.as_micros()); + let delay = (1_000_000u128 / 60).saturating_sub(elapsed.as_micros()); thread::sleep(Duration::from_micros(delay as u64)); } }