Fixed mouse movement
parent
dc0f163c1d
commit
a0646dbf45
|
|
@ -128,14 +128,14 @@ fn free_system(
|
||||||
if mouse_input.pressed(MouseButton::Middle) {
|
if mouse_input.pressed(MouseButton::Middle) {
|
||||||
motion += raw_mouse_motion * projection.scale * Vec2::new(-1.0, 1.0);
|
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,
|
(true, false) => -1.0,
|
||||||
(false, true) => 1.0,
|
(false, true) => 1.0,
|
||||||
(_, _) => 0.0,
|
(_, _) => 0.0,
|
||||||
} * projection.scale
|
} * projection.scale
|
||||||
* time.delta_seconds()
|
* time.delta_seconds()
|
||||||
* 100.0;
|
* 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,
|
(true, false) => -1.0,
|
||||||
(false, true) => 1.0,
|
(false, true) => 1.0,
|
||||||
(_, _) => 0.0,
|
(_, _) => 0.0,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue