Why are gui objects offset when they are rotated?

I’ve been trying to create a cool little loading icon animation using multiple image labels, but when I ran the loop to rotate one of the images I noticed that it would appear as if the image was off center once it started rotating, so I messed around in illustrator for about an hour before realizing that it wasn’t MY error, it was happening on ROBLOX’s end.

When a gui object is rotated, it becomes slightly offset from it’s original position, regardless of the anchorpoint.

The following image contains two frames of the same parent. Both frames have the same anchorpoint (0.5), size, position, and rotation. The difference is that one of the frames is white, and is currently underneath the black frame.

image

When the black frame on top is rotated 180 degrees, however, it would be expected that the white frame underneath would still not be visible, with consideration for the anchorpoint. But instead, the black frame is offset a couple pixels to reveal a sliver of the white frame. This means that when a gui object is rotated, even when centered to it’s parent, it does not retain it’s position in the center, and is instead slightly offset:

image

I’m not sure if this is just some sort of weird bug or if I’m doing something wrong, but it’s preventing me from actually following through with the icon animation I was trying to do since it just looks awful.

2 Likes