UI changing AbsolutePosition with different resolutions in a UIGridLayout

So I’m creating a 2d game, sorta like minesweeper, but not quite. Anyway, the game mostly works, but I’m having trouble with the tiles AbsolutePosition property changing with different screen resolutions. Lemme explain why I need AbsolutePosition a bit. So how I’m detecting other tiles around the tile clicked, is by checking if the tile is within a certain AbsolutePosition range (using NumberRange). And there my problem arises. When I change the screen’s resolution, the amount the AbsolutePosition it changed by becomes far greater than what I have set for the range inside the NumberRange. I also can’t make the NumberRange bigger, since if I do make it much bigger, the tile clicked will detect two tiles over when in smaller resolutions. I’ve tried figuring out a multiple to multiply my variables by (variables being the 2 numbers in the NumberRange). Here’s the data, if anyone smart can help me figure it out (yea, im kinda dumb lol).

AbsolutePosition difference --ResolutionX (The first number in the resolution name: e.g the 1920 in 1920x1080)

31 --640
62 --1280
65 --1366
93 --1920

I’ve also tried using UIAspectRationConstant, but that didn’t work either. Any help is appreciated. :slight_smile:

1 Like

Can you post a screenshot explaining what the issue is?

Sorry I’m replying so late. I’ve figured out how to fix it. So I found the slope of all the numbers, left side being my x, and right being the y. And I found the average slope to be around 20.5. So I’m dividing my resolution by the slope to get the number on the left. Therefore I can now apply the slope to any resolution and can get a number within the number range.