I am trying to fit textureRects inside of a VBoxContainer such that they will keep their aspect ratio and expand to fit the width of the VBox Container.
I tried following the advice on this thread : https://forum.godotengine.org/t/how-to-actually-center-a-control-node/11289/2, but my result would either add white space to the bottom (top), or not scale the width to the size of the container (bottom). Ideally the texture would look like it does on the top but without pushing other textures down.
#how to properly fit texture rects into containers
1 messages · Page 1 of 1 (latest)
try playing around with Layout/Container Sizing in the Inspector of the texture rects. Probably you want horizontal fill, but vertical shrink.
you can also try setting a custom_mimimum_size
Can you check out "Expand Fit Height Proportional" in your TextureRect's Expand Mode?