diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-04 16:59:52 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-04 16:59:52 +0000 |
commit | 3d97c7737fdda88c5d5d9e3e7d13f4c1973c7774 (patch) | |
tree | f4ee6f9e88645f76786589f1cb929eade66ce858 /src/ui | |
parent | 81acfb7cd3ced1e613acaf45b44867e56b137dc9 (diff) |
corrected modelview rotation to radians
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/modelview.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |