From 3d97c7737fdda88c5d5d9e3e7d13f4c1973c7774 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 4 Oct 2010 16:59:52 +0000 Subject: corrected modelview rotation to radians --- src/ui/modelview.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/modelview.cc') diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc index 7eb1be6..b247213 100755 --- a/src/ui/modelview.cc +++ b/src/ui/modelview.cc @@ -108,12 +108,12 @@ void ModelView::on_mousemove(const math::Vector2f &cursor) const math::Vector2f pos(cursor - modelview_cursor); const math::Vector3f up(0.0f, 0.0f, 1.0f); - const float zrot = 45.0f * pos.x() / width(); + const float zrot = 2.0f * M_PI * pos.x() / width(); modelview_axis.rotate(up, -zrot); //modelview_manipaxis.rotate(up, -zrot); const math::Vector3f left(0.0f, 1.0f, 0.0f); - const float yrot = 45.0f * pos.y() / height(); + const float yrot = 2.0f * M_PI * pos.y() / height(); modelview_axis.rotate(left, yrot); //modelview_manipaxis.rotate(left, yrot); -- cgit v1.2.3