Need help with scaling an image inside a GUI

When I rescale my screen, you’ll see that the image doesn’t stay inside the scroll on the bottom left. How do I do this? I need it to keep it’s ratio (not squish) but rescale inside the scroll.


The hierarchy chart goes as followed:

Name GUI

|
V

Frame

|
V

ScrollImage

|
V

CharacterImage / Name

How would I do this using the images properties?

1 Like

It’s because you are using the two y values in the size property (e.g. {0, 100},{0, 100}). You need to use the x values (e.g. {0.5, 0},{0.5, 0}), this will have the image stay the same ratio by scaling up or down to fit the screen size.

2 Likes

Got it, thanks :slight_smile: does the SizeConstraint matter?

Leave the SizeConstraint as RelativeXY if you are ok with the image stretching. Changing it to either RelativeXX or RelativeYY will make the images X and Y values the same, keeping it a square.

1 Like

Thought so :slight_smile: thanks for clarifying :smiley: