From 0b9b984c294db21f2f8f56a1bde6b6a8539c9ec3 Mon Sep 17 00:00:00 2001 From: yuni Date: Mon, 18 Nov 2024 05:27:24 +0100 Subject: [PATCH] rotate with r+j or r+l --- src/camera.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index 6c65a05..bd73ed7 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -489,10 +489,18 @@ pub fn apply_input_to_player( pitch_yaw_rot[0] += mouseless_sensitivity; } if key_input.pressed(settings.key_mouseleft) { - pitch_yaw_rot[1] += mouseless_sensitivity; + if key_input.pressed(settings.key_rotate) { + pitch_yaw_rot[2] -= mouseless_rotation_sensitivity; + } else { + pitch_yaw_rot[1] += mouseless_sensitivity; + } } if key_input.pressed(settings.key_mouseright) { - pitch_yaw_rot[1] -= mouseless_sensitivity; + if key_input.pressed(settings.key_rotate) { + pitch_yaw_rot[2] += mouseless_rotation_sensitivity; + } else { + pitch_yaw_rot[1] -= mouseless_sensitivity; + } } if key_input.pressed(settings.key_rotateleft) { pitch_yaw_rot[2] -= mouseless_rotation_sensitivity;