From 1b25b358df0d4d2b5a4376d2145dc9a428ef0a21 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Thu, 8 May 2025 16:49:38 +0200 Subject: [PATCH] Fixed camera movement with arrow keys --- simulator/src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simulator/src/main.rs b/simulator/src/main.rs index f7462f5..9b3dd93 100644 --- a/simulator/src/main.rs +++ b/simulator/src/main.rs @@ -105,16 +105,16 @@ pub async fn run() { InputEvent::KeyPressed { key, .. } => { match key { Key::ArrowLeft => { - state.camera_mut().translate(Vector3::new(-1.0, 0.0, 0.0)); - } - Key::ArrowRight => { state.camera_mut().translate(Vector3::new(1.0, 0.0, 0.0)); } + Key::ArrowRight => { + state.camera_mut().translate(Vector3::new(-1.0, 0.0, 0.0)); + } Key::ArrowUp => { - state.camera_mut().translate(Vector3::new(0.0, 1.0, 0.0)); + state.camera_mut().translate(Vector3::new(0.0, -1.0, 0.0)); } Key::ArrowDown => { - state.camera_mut().translate(Vector3::new(0.0, -1.0, 0.0)); + state.camera_mut().translate(Vector3::new(0.0, 1.0, 0.0)); } Key::Period => { let mut sim = simulator.write().unwrap();