Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow mouse rotation compared to previous release #119

Open
tpikonen opened this issue Apr 25, 2024 · 3 comments
Open

Slow mouse rotation compared to previous release #119

tpikonen opened this issue Apr 25, 2024 · 3 comments

Comments

@tpikonen
Copy link
Contributor

The 'arc-ball' mouse control PR (#99) had the side effect of slowing down the mouse rotation by a large factor. I liked the fast rotation behavior of the previous release (0.10.0), so I fixed it by this trivial patch:

diff --git a/src/canvas.cpp b/src/canvas.cpp
index ff9f3ec..7f061e0 100644
--- a/src/canvas.cpp
+++ b/src/canvas.cpp
@@ -441,7 +441,7 @@ void Canvas::calcArcballTransform(QPointF p1, QPointF p2) {
     double angle = acos(std::min(1.0f,QVector3D::dotProduct(v1, v2))) * 180.0 / M_PI;

     // apply transform
-    currentTransform.rotate(angle,v1xv2Obj);
+    currentTransform.rotate(5.0*angle,v1xv2Obj);
 }

 void Canvas::mouseMoveEvent(QMouseEvent* event)

The factor 5.0 used here is not quite as fast as the previous version, but IMO better than the current master.

Should this change made (I can make a PR out of this), or should the acceleration factor be made configurable? Maybe not since fstl is currently nicely configuration-free.

@DeveloperPaul123
Copy link
Member

Could you post a video of the difference? I don't have a lot of context for this.

@tpikonen
Copy link
Contributor Author

I don't think a video would help much with explaining this. It's just that the ratio of pointer movement to object rotation is a lot smaller in current master than in the previous release.

This could be seen a regression by someone (like me), but is also largely a matter of opinion.

@DeveloperPaul123
Copy link
Member

Right. Given that's the case, I think having it available as a preference parameter would be a good compromise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants