Dynamically Changing Speech Bubble localScale

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
CheMBurN
Posts: 5
Joined: Tue Apr 13, 2021 12:04 am

Dynamically Changing Speech Bubble localScale

Post 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?
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dynamically Changing Speech Bubble localScale

Post 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?
CheMBurN
Posts: 5
Joined: Tue Apr 13, 2021 12:04 am

Re: Dynamically Changing Speech Bubble localScale

Post 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!
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dynamically Changing Speech Bubble localScale

Post by Tony Li »

Glad you got it working!
Post Reply