#Make a texture at the bottom center of textureRect bounding box

1 messages · Page 1 of 1 (latest)

gusty ember
#

Hi there!
I'm making plant specimen cards that should automatically generate based on textures in my game. I have everything else about the UI figured out, but I'm having issues with the left part meant to show scale of the whole plant next to an astronaut icon. I'd like all kinds of plants to fit exactly within this orange bounding box, but I'd like them to be centered at the bottom of the box, so they're on the black line like the astronaut. I can't figure out how to do that using anchors/offsets, grow direction, etc. in the textureRect options, the texture is always drawn at the top of the box. Is there a better way I could do this?

dire hearth
#

are your images generated with that space below them?

safe pumiceBOT
#

Online API Reference for Image. You can also use the offline documentation by pressing F1 in Godot and searching for a class name.

cold wadi
#

You can crop the image like this
img = get_region(img.get_used_rect())

gusty ember
gusty ember