From fd741ae905ecc63719bdb087d6bdcc3f7810d37d Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 15 Apr 2024 13:17:10 +0200 Subject: [PATCH] tweak mouseless camera control sensitivity --- src/camera.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index a642d9d..51565ca 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -277,7 +277,8 @@ pub fn apply_input_to_player( let mut mouse_delta = Vec2::ZERO; let mut pitch_yaw_rot = Vec3::ZERO; let sensitivity_factor = if settings.is_zooming { settings.zoom_sensitivity_factor } else { 1.0 }; - let mouseless_sensitivity = 40.0 * sensitivity_factor; + let mouseless_sensitivity = 8.0 * sensitivity_factor; + let mouseless_rotation_sensitivity = 40.0 * sensitivity_factor; if key_input.pressed(settings.key_mouseup) { pitch_yaw_rot[0] -= mouseless_sensitivity; } @@ -290,10 +291,10 @@ pub fn apply_input_to_player( pitch_yaw_rot[1] -= mouseless_sensitivity; } if key_input.pressed(settings.key_rotateleft) { - pitch_yaw_rot[2] -= mouseless_sensitivity; + pitch_yaw_rot[2] -= mouseless_rotation_sensitivity; } if key_input.pressed(settings.key_rotateright) { - pitch_yaw_rot[2] += mouseless_sensitivity; + pitch_yaw_rot[2] += mouseless_rotation_sensitivity; } for mouse_event in mouse_events.read() { mouse_delta += mouse_event.delta;