tweak mouseless camera control sensitivity
This commit is contained in:
parent
6c8cdf9af8
commit
fd741ae905
|
@ -277,7 +277,8 @@ pub fn apply_input_to_player(
|
||||||
let mut mouse_delta = Vec2::ZERO;
|
let mut mouse_delta = Vec2::ZERO;
|
||||||
let mut pitch_yaw_rot = Vec3::ZERO;
|
let mut pitch_yaw_rot = Vec3::ZERO;
|
||||||
let sensitivity_factor = if settings.is_zooming { settings.zoom_sensitivity_factor } else { 1.0 };
|
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) {
|
if key_input.pressed(settings.key_mouseup) {
|
||||||
pitch_yaw_rot[0] -= mouseless_sensitivity;
|
pitch_yaw_rot[0] -= mouseless_sensitivity;
|
||||||
}
|
}
|
||||||
|
@ -290,10 +291,10 @@ pub fn apply_input_to_player(
|
||||||
pitch_yaw_rot[1] -= mouseless_sensitivity;
|
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_sensitivity;
|
pitch_yaw_rot[2] -= mouseless_rotation_sensitivity;
|
||||||
}
|
}
|
||||||
if key_input.pressed(settings.key_rotateright) {
|
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() {
|
for mouse_event in mouse_events.read() {
|
||||||
mouse_delta += mouse_event.delta;
|
mouse_delta += mouse_event.delta;
|
||||||
|
|
Loading…
Reference in a new issue