diff options
Diffstat (limited to 'src/camera.rs')
| -rw-r--r-- | src/camera.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/camera.rs b/src/camera.rs index 9310cac..df6a023 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -15,17 +15,17 @@ pub struct Camera { impl Camera { pub fn handle_camera_input(&mut self, input: &Input, delta_time: f32) { // wasd movement - let x = if input.is_left_pressed { - -CAMERA_MOVEMENT_SPEED + let x: f32 = if input.is_left_pressed { + -1.0 } else if input.is_right_pressed { - CAMERA_MOVEMENT_SPEED + 1.0 } else { 0.0 }; - let y = if input.is_down_pressed { - CAMERA_MOVEMENT_SPEED + let y: f32 = if input.is_down_pressed { + 1.0 } else if input.is_up_pressed { - -CAMERA_MOVEMENT_SPEED + -1.0 } else { 0.0 }; |
