Resizing buttons through tweens adds size to right side only.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Burloe

I’m using tweens to give buttons a bit more oomph and while I could use scale to achieve the same effect. I just don’t like the artifacting it creates on pixel art. So I’m trying to tween size to get a little wobble going on hover and press.

The issue is that increasing the size only adds to the right side when I’d want it to add to both sides simultaneously. I’ve tried some of the layout dirs, anchor and container sizing options and none seems to have the intended effect.

Thanks in advance!

If you can’t find a solution, you’ll probably have to tween the position by half the value in the opposite direction.

Griefchief | 2023-07-08 20:18

I realize I read your question too quickly and missed the fact that you don’t want to use scale here - which is what I suggested in the answer. I’ll hide my answer.

jgodfrey | 2023-07-08 20:33

I see, I tried it but it was a bit distracting given how my button has textures within it but it works on clean 9slice buttons though. Good workaround, thanks.

No worries. Made the same mistake many times :slight_smile:

Burloe | 2023-07-08 20:37