Fixed mouse movement

hheik 2023-12-02 16:30:27 +02:00
parent dc0f163c1d
commit a0646dbf45
1 changed files with 2 additions and 2 deletions

View File

@ -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,