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

Rotation issue in perspective mode #292

Open
simonbethke opened this issue Nov 17, 2024 · 7 comments
Open

Rotation issue in perspective mode #292

simonbethke opened this issue Nov 17, 2024 · 7 comments

Comments

@simonbethke
Copy link
Contributor

This Video shows an issue with rotation when in perspective mode:

rotation.issue.mp4

Look closely at the mouse-position during rotation. I would expect the rotation marker (the line in the circle) to point always in direction of the mouse. So I can drag the mouse far away from the pivot to gain precision. This doesn't work currently. Even far away, the absolute amount of pixels on x or y that I move the mouse will translate directly to the rotation angle.

@willeastcott willeastcott changed the title Rotationissue in perspective mode Rotation issue in perspective mode Nov 17, 2024
@slimbuck
Copy link
Member

cc @kpal81xd

@kpal81xd
Copy link

So the rotation gizmo has two types of rotation:

  • The angle calculated from the mouse relative to the center of rotation (This is for when the axis you are rotating around is close to the axis of the camera forward vector)
  • The angle calculated as a displacement in the direction perpendicular to the axis (This is for all other orientations)

The latter rotation is what you are experiencing in that video hence why when you move the mouse along the axis the displacement in the perpendicular direction to the axis direction is negligent thus no rotation. The line shown on the rotation gizmo along with the darker line (initial mouse position) is used to represent the sector of the angle that has been rotated.

@simonbethke
Copy link
Contributor Author

This is not useful and reduces precision abilities

@kpal81xd
Copy link

This is not useful and reduces precision abilities

How would you suggest for it to work?

@simonbethke
Copy link
Contributor Author

simonbethke commented Dec 12, 2024

Just like you describe in point one:
The angle calculated from the mouse relative to the center of rotation.

You wrote "This is for when the axis you are rotating around is close to the axis of the camera forward vector". I think it would work well even if the rotation axis is not close the the camera forward vector.

The red 'radius-line' in the video should always point in the exact direction of the mousecursor

@kpal81xd
Copy link

Just like you describe in point one: The angle calculated from the mouse relative to the center of rotation.

You wrote "This is for when the axis you are rotating around is close to the axis of the camera forward vector". I think it would work well even if the rotation axis is not close the the camera forward vector.

The red 'radius-line' in the video should always point in the exact direction of the mousecursor

In theory yes but sometimes you want to rotate the object when where the axis is almost perpendicular to the camera and this makes it difficult to rotate. I could change the conditions to only use the absolute rotation in this scenario and the mouse relative rotation otherwise?

@simonbethke
Copy link
Contributor Author

That would help for sure! generally I wonder if it is a good idea to switch behaviour based on the viewing direction.

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

3 participants