From 3b839ad6304496e6ba6ab43a0df070f8063a99cc Mon Sep 17 00:00:00 2001 From: zhenyan121 <3367366583@qq.com> Date: Sat, 21 Mar 2026 14:26:45 +0800 Subject: [PATCH] feat: enable raw mouse motion --- include/Cubed/gameplay/player.hpp | 2 +- src/window.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/Cubed/gameplay/player.hpp b/include/Cubed/gameplay/player.hpp index 87050d8..392bc75 100644 --- a/include/Cubed/gameplay/player.hpp +++ b/include/Cubed/gameplay/player.hpp @@ -17,7 +17,7 @@ private: float m_yaw = 0.0f; float m_pitch = 0.0f; - float m_sensitivity = 0.05f; + float m_sensitivity = 0.15f; float m_speed = 5.0f; diff --git a/src/window.cpp b/src/window.cpp index 6d98e51..6be3714 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -46,7 +46,12 @@ void Window::init() { glfwSetInputMode(m_window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); - + if (glfwRawMouseMotionSupported()) { + glfwSetInputMode(m_window, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE); + } else { + LOG::warn("Don,t support Raw Mouse Motion"); + } + //update_viewport(); } \ No newline at end of file