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

Add trackball-style rotation for 3D gizmo (like in Blender) #7753

Open
bonclide opened this issue Sep 19, 2023 · 2 comments
Open

Add trackball-style rotation for 3D gizmo (like in Blender) #7753

bonclide opened this issue Sep 19, 2023 · 2 comments

Comments

@bonclide
Copy link

Describe the project you are working on

Simple first test project

Describe the problem or limitation you are having in your project

3D rotation gizmo does not have Trackball rotation (as far as I know)

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add a trackball that can be selected when rotating objects, and will rotate all axis at once, depending on where the mouse is. Like this, from blender:

Blender's Trackball for rotating

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

trackballmockup

There would be a transparent ball around the axes that can be selected, and when hovered over, it will light up, showing that you can select it. When selecting it, it will behave like a trackball, very similar to the previous example above.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It could be an add-on or option in a menu, but that would hide it from people who really need it, searching through all those menus.

Is there a reason why this should be core and not an add-on in the asset library?

This will greatly improve the rotation tool and can be a real time saver, instead of doing all axes one by one. If it were an add-on, most people wouldn't even know the time they could've saved.

@Calinou Calinou changed the title Trackball style rotation for 3D gizmo, like in Blender Add trackball style rotation for 3D gizmo (like in Blender) Sep 20, 2023
@Calinou Calinou changed the title Add trackball style rotation for 3D gizmo (like in Blender) Add trackball-style rotation for 3D gizmo (like in Blender) Sep 20, 2023
@Calinou
Copy link
Member

Calinou commented Sep 20, 2023

This is already implemented, but you need to switch to the Rotate mode (R) and drag the mouse anywhere with a node selected, or press the rotate action shortcut (which isn't bound by default unless godotengine/godot#78148 is merged).

@Lamoot
Copy link

Lamoot commented Sep 9, 2024

Hello,

to clarify things, this feature is not yet implemented in Godot. What is implemented is rotating an object along the view axis. The two methods might initially look similar, but they are different and have their valid use cases.

To show the difference more clearly, here's a quick video from Blender showing the two rotation methods. Each has a different way to access it.

  • Regular rotation is started with the mouse outside the rotation gizmo (or shortcut R) and it defaults to rotating around the view axis. Optionally, you can then further press keys (X, Y, Z) to constrain rotation to a particular axis.
  • Trackball rotation is started with the mouse inside the rotation gizmo (or shortcut R, R). In this mode you cannot and don't need to constrain rotation to any axis.
blender_view_rotation_vs_trackball.mp4

Notice also how the mouse cursor changes, to show what kind of input is required. Trackball rotation is a very useful addition to control the orientation of a 3D object. Rather than taking axes into consideration, it allows a more freeform style of rotation. It's quite common in many 3D programs and game engines and it would fit into Godot as well.

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

No branches or pull requests

3 participants