Topic was automatically imported from the old Question2Answer platform.
Asked By
user41420082
Old Version
Published before Godot 3 was released.
So this sounds stupid but I can’t figure out how to move the pivot point for Buttons. For example, I have a button and wanted to rotate it from the center. It rotates to the top-left as its pivot point. The tooltip on the Select Mode says I should press V to change pivot but I’m not seeing any visual feedback at all when I press it nor does the pivot point change.
You need to make sure your node is selected and the cursor is located where you want the pivot point to go, then press V. The shortcuts generally only work when you’re hovering the panel they are assigned to.
That did work for Sprites but on Buttons it doesn’t work. I can’t even see the offset property on the button’s property inspector
user41420082 | 2016-10-12 23:22
Oh my mistake, I thought Node2D is where the offset property came from. Apparently they’re only on specific nodes like Sprites.
As vinod says below, use a work around.
Us an empty parent node as a pivot point.
What I would do is use a Position2D node as a parent, since it has a visible cross hair. Put the button as a child of it, set the property “Behind Parent” to true so you can see it, or change it’s Z order. Then move your button while knowing that Position2D cross hair is your pivot. After that, go back and do your rotations on the Position2D.
A simple workaround is to add a Container with width and height set to 0. Then add your button as a child of this Container by positioning it to the button’s -halfwidth and -halfheight.