From: Matt Keeter Date: Fri, 14 Mar 2014 14:43:07 +0000 (-0400) Subject: Made models non-mirrored X-Git-Tag: v0.9.0~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8d18fdac060660b760d32158ea41ce2c3f8a4cf;p=fstl Made models non-mirrored --- diff --git a/src/canvas.cpp b/src/canvas.cpp index 91db4d7..bfbc3c0 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -107,11 +107,11 @@ QMatrix4x4 Canvas::view_matrix() const QMatrix4x4 m; if (width() > height()) { - m.scale(height() / float(width()), 1, 0.5); + m.scale(-height() / float(width()), 1, 0.5); } else { - m.scale(1, width() / float(height()), 0.5); + m.scale(-1, width() / float(height()), 0.5); } return m; } @@ -139,7 +139,7 @@ void Canvas::mouseMoveEvent(QMouseEvent* event) { auto p = event->pos(); auto d = p - mouse_pos; - yaw = fmod(yaw + d.x(), 360); + yaw = fmod(yaw - d.x(), 360); tilt = fmax(0, fmin(180, tilt - d.y())); mouse_pos = p; update();