diff options
Diffstat (limited to 'visualization/qmpvisualization.cpp')
-rw-r--r-- | visualization/qmpvisualization.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/visualization/qmpvisualization.cpp b/visualization/qmpvisualization.cpp index 763ab4f..3dc0324 100644 --- a/visualization/qmpvisualization.cpp +++ b/visualization/qmpvisualization.cpp @@ -186,6 +186,7 @@ void qmpVisualization::showThread() debug = false; ctk = api->getCurrentTimeStamp(); lst = std::chrono::steady_clock::now(); + sm->smSetMouseGrab(false); sm->smMainLoop(); sm->smFinale(); } @@ -327,8 +328,10 @@ void qmpVisualization::updateVisualization3D() { float x, y; sm->smGetMouse2f(&x, &y); - rot[1] -= (y - lasty) * 0.01; - rot[2] += (x - lastx) * 0.01; + rot[1] -= (y - lasty) * 0.1; + rot[2] += (x - lastx) * 0.1; + lastx = x; + lasty = y; while (rot[1] > 360) rot[1] -= 360; while (rot[1] < 0) |