-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 temporary pivot for rotating multiple 2D nodes #58375
Add temporary pivot for rotating multiple 2D nodes #58375
Conversation
24fc10a
to
6cdd5b6
Compare
Ok I went with the third option. Alt with Pivot Tool moves temporary pivot (I had to make the tool active for any CanvasItem) and Alt + V changes temp pivot for selection tool. |
6cdd5b6
to
f627d83
Compare
f627d83
to
1a57b7e
Compare
1a57b7e
to
674ac2b
Compare
674ac2b
to
96d50b7
Compare
96d50b7
to
8c12c69
Compare
Tested locally (rebased on latest
|
8c12c69
to
9044547
Compare
Fixed, I think. I couldn't really reproduce the problem, but I noticed the pivot did not appear when you click, only when you drag.
Not this again 🙄 I think we decided that we don't care about window managers doing stupid things with Alt.
I added an Alt action when you press the Pivot tool. Kind of weird, but it works.
I don't think it's worth it, as it complicates things. Shortcut before dragging (e.g. hold Ctrl before starting rotating) would make it inconsistent with select tool and shortcut while rotating (e.g. hold Shift during rotation action) would result in toggling the pivot mid-rotation, which would either teleport the nodes or remember their position, which again is a hassle to handle xd |
9044547
to
00f50b3
Compare
Changed the modifier to Shift (it doesn't conflict with anything, so whatevs) and fixed a crash. |
00f50b3
to
f8cd3bb
Compare
Tested and this seems to work well. The discoverability isn't the best, but that might come from me not actually knowing much of the existing hotkeys and tools. I'm not sure how to use the current Pivot tool xD And from reading the PR I saw that Shift+V when in Select mode does place the temp pivot, which is nice. But is just "V" supposed to place the main pivot? Because that doesn't seem to work for me. I guess it may not work in multi-select? The Shift+V behavior could be added to the (already lengthy) tooltip for Select Mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well for the most part, might need some iteration on the UX / discoverability.
Yes: MYIFnPQoB5.mp4Changing pivot involves changing node's position and setting the pivot so that the visual part stays in place. The pivot is not displayed when multiple nodes are selected, but setting it still works.
Shift+V is "inherited" from pivot tool. It's the same as Shift in scale tool, which is only mentioned in the scale tooltip, but you can use it in select mode too. |
Ok changing the pivot with "V" seems to work with a Sprite2D, but doesn't work with a CharacterBody2D. How come? |
Because CharacterBody2D doesn't have |
Right, that makes sense. But that's still confusing to me, as if I multi-select 3 CharacterBody2D's, I can give them a temp pivot and rotate them fine :D |
Thanks! |
Closes godotengine/godot-proposals#3684
You can set a temporary pivot, which will be used as rotation origin for the selected nodes, in global coordinates. It's very useful when e.g. placing objects on your level (using a parent node as rotation point is very inconvenient, because usually you don't need it after rotation). The pivot disappears when selection changes.
Submitting as draft, as I didn't know where to put it xd Right now it uses hard-coded P shortcut. I've been thinking about 3 options:Resolved.I like the third one the best, but it's probably up to discussion. The code uses the easiest option until this is settled.