diff --git a/src/game/camera.rs b/src/game/camera.rs index 923baf9..29344aa 100644 --- a/src/game/camera.rs +++ b/src/game/camera.rs @@ -128,14 +128,14 @@ fn free_system( if mouse_input.pressed(MouseButton::Middle) { motion += raw_mouse_motion * projection.scale * Vec2::new(-1.0, 1.0); } - motion.x = match (key_input.pressed(KeyCode::A), key_input.pressed(KeyCode::D)) { + motion.x += match (key_input.pressed(KeyCode::A), key_input.pressed(KeyCode::D)) { (true, false) => -1.0, (false, true) => 1.0, (_, _) => 0.0, } * projection.scale * time.delta_seconds() * 100.0; - motion.y = match (key_input.pressed(KeyCode::S), key_input.pressed(KeyCode::W)) { + motion.y *= match (key_input.pressed(KeyCode::S), key_input.pressed(KeyCode::W)) { (true, false) => -1.0, (false, true) => 1.0, (_, _) => 0.0,