How to Set the Pivot to the Upper-Right Corner?

Godot Version

4.4.1

Question

I’d like to set this node’s pivot to the upper right corner, rather than the upper left. Is the only/best way to do that by matching the Pivot Offset.x to the Size.X?

I’m hoping there’s another solution, since that absolute Pivot Offset doesn’t respond to changes to the control’s Size. For example, Unity’s pivot values are relative to the element’s size, where `1 == width`, and `0.5 == width / 2`, etc. That’s nice because changing the width of the element doesn’t change where the pivot is.

There’s pivot_offset_ratio property that was added I think in 4.6. In earlier versions the only way is to set it to size.

I think it’s 4.7 they added that. But yeah it’s really annoying. I recommend upgrading. Back up your project first.

It’s there in 4.6.

Thank you! I’ll look into upgrading.