diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index b695180dc0..d9ffc10387 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -97,7 +97,7 @@ private: float m_angle_y = 0.0; float m_angle_z = 0.0; Gfx::IntPoint m_last_mouse; - float m_rotation_speed = 1.f; + float m_rotation_speed = 60.f; bool m_show_frame_rate = false; int m_cycles = 0; int m_accumulated_time = 0; @@ -124,8 +124,8 @@ void GLContextWidget::mousemove_event(GUI::MouseEvent& event) int delta_x = m_last_mouse.x() - event.x(); int delta_y = m_last_mouse.y() - event.y(); - m_angle_x -= delta_y / 100.0f; - m_angle_y -= delta_x / 100.0f; + m_angle_x -= delta_y / 2.0f; + m_angle_y -= delta_x / 2.0f; } m_last_mouse = event.position(); @@ -315,13 +315,13 @@ int main(int argc, char** argv) widget.set_rotation_speed(0.f); }); auto slow_rotation_action = GUI::Action::create_checkable("&Slow", [&widget](auto&) { - widget.set_rotation_speed(0.5f); + widget.set_rotation_speed(30.f); }); auto normal_rotation_action = GUI::Action::create_checkable("&Normal", [&widget](auto&) { - widget.set_rotation_speed(1.f); + widget.set_rotation_speed(60.f); }); auto fast_rotation_action = GUI::Action::create_checkable("&Fast", [&widget](auto&) { - widget.set_rotation_speed(1.5f); + widget.set_rotation_speed(90.f); }); rotation_speed_actions.add_action(*no_rotation_action); diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index a3370a1e9a..323955520c 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -504,7 +504,7 @@ void SoftwareGLContext::gl_rotate(GLdouble angle, GLdouble x, GLdouble y, GLdoub FloatVector3 axis = { (float)x, (float)y, (float)z }; axis.normalize(); - auto rotation_mat = Gfx::rotation_matrix(axis, static_cast(angle)); + auto rotation_mat = Gfx::rotation_matrix(axis, static_cast(angle * M_PI * 2 / 360)); if (m_current_matrix_mode == GL_MODELVIEW) m_model_view_matrix = m_model_view_matrix * rotation_mat;