rotate with r+j or r+l

This commit is contained in:
yuni 2024-11-18 05:27:24 +01:00
parent 780fa65349
commit 0b9b984c29

View file

@ -489,10 +489,18 @@ pub fn apply_input_to_player(
pitch_yaw_rot[0] += mouseless_sensitivity; pitch_yaw_rot[0] += mouseless_sensitivity;
} }
if key_input.pressed(settings.key_mouseleft) { 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) { 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) { if key_input.pressed(settings.key_rotateleft) {
pitch_yaw_rot[2] -= mouseless_rotation_sensitivity; pitch_yaw_rot[2] -= mouseless_rotation_sensitivity;