Problem with UI position/scaling (Solved?)

I have UI that I’m making, but for now I’m using an example UI. I want to make my UI the same size for all devices (yes, I am using scale and not offset), but there’s a problem. On older devices, the UI is placed differently.

PC


iPhone 4S (Older Device)

The white frame is slightly out of place on the iPhone…


I don’t know what the problem is. I’ve tried using the Autoscale Lite plugin (which many others have said in unreliable), using the AnchorPoint, but nothing worked! Am I able to fix this? Or is this some kind of bug?

what position is the Ui at? Where are you trying to get them? They both look to be at the center of the screen to me.

My goal was to make a border for the UI (the white outline you see around the black frame), but it’s slightly out of place on older devices. Either way, the AnchorPoint and Position for both frames are {0.5, 0, 0.5, 0}. The size is {0.1, 0, 0.2, 0} for the black frame and the size for the border frame is {0.98, 0, 0.98, 0}.

Well, the phone’s resolution is significantly smaller than the Pc’s resolution, so there is less pixels to color, and the white frame has to get shifted a tad to the side to take up around the same size. You would need to make the white frame a larger size to ensure it it getting shown on both sides. It’s going to be impossible to make it perfectly align, but if you make the white frame larger, it won’t be as noticeable.

1 Like

Well, that’s annoying. I’ve tried everything I can to fix this, but nothing works, so you might be right,

You can’t use a UIStroke I assume?

I used it, but it doesn’t scale properly on all sides for some devices. I assume that it isn’t really something that can be fixed, can it?

How’s this?
borderoffsetexample.rbxm (2.5 KB)

You can simulate different screen sizes

Studio

TEST > Devices

For me I just resize my app window in weird ways to quickly simulate all aspect ratios and sizes.

1 Like

Gosh I thought I replied to the wrong person for a sec there but you just changed your display name and avatar hahaha

1 Like

Haha, lol. Yeah, I just updated my pfp.

Okay, so I discovered that changing the test window size to “Actual Resolution” or “Physical Size” eliminates this issue, but only for some devices. For UIStrokes, the issue is alleviated for all devices. I also tinkered around with the “Calibrate Physical Scale” (I’m assuming it says scale, but I’m not entirely sure because it gets cut off for me), which made it scale properly for most devices when using “Physical Size” to test it out. So, overall, it’s just better to use UIStrokes and UIAspectRatioConstraints.

Thanks to all who tried to help me!