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

Blender style rotation doesn't rotate around the object but random point elsewhere. #90081

Closed
viksl opened this issue Mar 31, 2024 · 3 comments · Fixed by #90098
Closed

Blender style rotation doesn't rotate around the object but random point elsewhere. #90081

viksl opened this issue Mar 31, 2024 · 3 comments · Fixed by #90098

Comments

@viksl
Copy link
Contributor

viksl commented Mar 31, 2024

Tested versions

4.3dev [c21c3a9f42866b69ae3b6371154eaec33fdc840b]

System information

Windows 11 - Vulkan - Nvidia RTX 4070 - intel i5 13600KF

Issue description

When you use blender style rotation and try to move the cursor around the object it won't work properly, instead you need to find a random point somewhere else on screen which serves as a center, this point can easily be somewhere in the UI, check the video below:

(At the beginning of the video I show how rotation works fine with gizmos and then later the problem with blender style shortcuts)
Video: https://youtu.be/LLi5zzW6DZc

This makes it more or less unasable to use this style of rotation controls.

Steps to reproduce

  1. Open the MRP project.
  2. In the Editor Settings set a shortcut to the blender rotation (Begin Rotate Transformation)
  3. Use the rotation on the object and press Y or other axis to lock the rotation around.
  4. Try to rotate the object and observe how cumbersome it is.

Minimal reproduction project (MRP)

Mrp-blender-controls.zip

@viksl
Copy link
Contributor Author

viksl commented Apr 1, 2024

This report and #85810 are the same issue.

@viksl
Copy link
Contributor Author

viksl commented Apr 1, 2024

Problem is that when rotating the input is called which gives Editor wide mouse position while the initial (begin_transform) button pressed as well as the rotation gizmo use sinput which is local to the viewport itself only so there's a difference in positions and thus the "jump" which is described in the other report and why in the video here you can see the rotation center offset (it's offset by the UI elements around the viewport).

In Blender the rotation does wrap but in Godot the wrapping is specifically disabled for instant rotation only so we either enable it or when the instant rotation is enabled we send it through sinput as it worked in 4.1 when the blender like controls were added.

@AThousandShips
Copy link
Member

Thank you for reporting, consolidating in the other report, please add your information there

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

Successfully merging a pull request may close this issue.

2 participants