diff --git a/src/camera.rs b/src/camera.rs index 7a1b003..0c2f49f 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -481,12 +481,17 @@ pub fn apply_input_to_player( } if mouse_delta != Vec2::ZERO { if key_input.pressed(settings.key_rotate) { - pitch_yaw_rot[2] += 2.0 * mouse_delta.x / win_res_x; + pitch_yaw_rot[2] += mouse_delta.x / win_res_x; } else { - pitch_yaw_rot[0] += 2.0 * mouse_delta.y / win_res_y; - pitch_yaw_rot[1] -= 2.0 * mouse_delta.x / win_res_x; + pitch_yaw_rot[0] += mouse_delta.y / win_res_y; + pitch_yaw_rot[1] -= mouse_delta.x / win_res_x; } } + pitch_yaw_rot *= 2.0 * if settings.is_zooming { + settings.zoom_sensitivity_factor + } else { + 1.0 + }; // Apply rotation to player if pitch_yaw_rot != Vec3::ZERO {