Set the rotation pivot of a GUI at the anchor point

At the moment the rotation of a GUI is still about its center no matter what the anchor point is and I think that’s a bit counter-productive considering the fact that both re-positioning and resizing are centered around the anchor point. Instead of having to do a bunch of trig or hacky workarounds to get a GUI to pivot around a specific point I think a better solution would be to simply have the GUI pivot around the anchor point or at least make it a property that allows the GUI to toggle between anchor point pivot and center pivot.

27 Likes

Make a tiny invisible gui the parent, offset the gui

6 Likes

This is more of a hack, and one of the reasons behind AnchorPoint and the new UI constraints, so it’d definitely be nice for Rotation to respect AnchorPoint.

2 Likes

As it turns out, nobody uses AnchorPoint in a way that would benefit from this. Better to just make a new property.

http://devforum.roblox.com/t/rotation-of-gui-objects-about-points-other-than-the-center-how-should-it-work/34759

This was one of the first things I looked at doing when joining Roblox. Ultimately, it got de-prioritized for a few reasons: Dynamically rotating UI elements is uncommon, and the lack of anti-aliasing means it doesn’t look great when it is done. Secondly, a new rotation point wouldn’t really add new capabilities; all it would do is make rotating things about an arbitrary point more elegant than using an extra level of container frame. Thirdly, the most popular choice, a new rotation point, is difficult to make work intuitively for everyone, since some use cases would benefit from the rotation being applied before any translation or scaling, and others would benefit from the rotation being applied last. With the extra frame method, there is no such ambiguity.

3 Likes

Will there ever be anti-aliasing for UI objects that are rotated?

1 Like