Page 1 of 1

Dynamically Changing Speech Bubble localScale

Posted: Sat Apr 17, 2021 10:39 am
by CheMBurN
Hi Tony,

I have a character for whom I flip around with localScale and I'm having trouble getting the UI to scale accordingly. Everytime the character changes localScale.x to -1, the subtitles are reversed and if I match the UI's localScale to the character transforms UI scale in Update(), the subtitle chars become blocky and weird.

Does DS have a way of dealing with this natively?

Re: Dynamically Changing Speech Bubble localScale

Posted: Sat Apr 17, 2021 11:45 am
by Tony Li
Hi,

Not for changing localScale. When you flip the character's localScale.x, can you flip the child UI's localScale.x back so it's oriented properly?

Re: Dynamically Changing Speech Bubble localScale

Posted: Sat Apr 17, 2021 12:26 pm
by CheMBurN
Tony Li wrote: Sat Apr 17, 2021 11:45 am Hi,

Not for changing localScale. When you flip the character's localScale.x, can you flip the child UI's localScale.x back so it's oriented properly?
Tried that but it doesn't work. Apparently its related to the UI's Z scaling so I had to scale the object and the UI on its Z as well for it to work properly without getting the TMPro texture blocky (even though the game's 2D).

The code was too messy in any case so I created a parent for both that doesn't scale and got the UI to follow the object in Update() which works just fine.

Thanks for assist!

Re: Dynamically Changing Speech Bubble localScale

Posted: Sat Apr 17, 2021 2:19 pm
by Tony Li
Glad you got it working!