Allow adjusting mouse sensitivity #1

Open
opened 2021-04-13 19:24:48 -04:00 by michael · 0 comments
Owner

I've attached a patch that shows where the sensitivity would need to be applied, as well as adjusting it to suit my own needs.

diff --git a/src/main.rs b/src/main.rs
index fba2f41..721de71 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -620,8 +620,8 @@ fn handle_window_event<T>(
                             .entities
                             .get_component_mut(player, game.server.rotation)
                             .unwrap();
-                        rotation.yaw -= rx;
-                        rotation.pitch -= ry;
+                        rotation.yaw -= rx*2.4f64;
+                        rotation.pitch -= ry*2.4f64;
                         if rotation.pitch < (PI / 2.0) + 0.01 {
                             rotation.pitch = (PI / 2.0) + 0.01;
                         }
I've attached a patch that shows where the sensitivity would need to be applied, as well as adjusting it to suit my own needs. ```patch diff --git a/src/main.rs b/src/main.rs index fba2f41..721de71 100644 --- a/src/main.rs +++ b/src/main.rs @@ -620,8 +620,8 @@ fn handle_window_event<T>( .entities .get_component_mut(player, game.server.rotation) .unwrap(); - rotation.yaw -= rx; - rotation.pitch -= ry; + rotation.yaw -= rx*2.4f64; + rotation.pitch -= ry*2.4f64; if rotation.pitch < (PI / 2.0) + 0.01 { rotation.pitch = (PI / 2.0) + 0.01; } ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mirrors/stevenarella#1
No description provided.