Commit 5134e335 authored by Mike Kremer's avatar Mike Kremer

Corrected first-person navigation mode.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7029 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a4223e38
......@@ -1752,13 +1752,10 @@ void glViewer::treatFirstPersonNavigation( QMouseEvent* _event) {
double diffx = xo - x;
double diffy = yo - y;
ACG::Vec3d yaxis(0.0, 1.0, 0.0);
ACG::Vec3d xaxis(1.0, 0.0, 0.0);
ACG::Vec3d yaxis = glstate_->modelview().transform_vector(glstate_->up());
ACG::Vec3d xaxis = glstate_->modelview().transform_vector(glstate_->right());
ACG::Vec3d eye = glstate_->modelview().transform_point(glstate_->eye());
glstate_->rotate(-diffx * 90, 0.0, 1.0, 0.0);
glstate_->rotate(diffy * 90, 1.0, 0.0, 0.0);
ACG::Vec3d eye = glstate_->eye();
rotate(yaxis, -diffx * 90, glstate_->eye());
rotate(xaxis, diffy * 90, glstate_->eye());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment