Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[solved] Wave effect with Scale, problem with pivot X.

A topic by ZeLDER created Sep 22, 2018 Views: 274 Replies: 2
Viewing posts 1 to 3
(3 edits)

At first, this is <w>nice</w> util ;)

When I create a wave effect with only Scales by X and Y. I want something just like resizing an icon in text from its middle/center. I have set CurveX and CureY, set Pivot X = 0.5 and PivotY = 0.5 and named this wave effect like 'alert'. Using this: "Some icon <w=alert><q=cross></w> sized." So, it is scaled from middle by pivot Y, but NOT from center by pivot X.

PS. when I try it with a char from font ("Char <w=alert>A</w> sized") - it is ok.

PSS. this in UI

Developer (1 edit)

Hey!


Good catch, looks like the pivot point wasn't respecting quads.

In the script "STMTextInfo.cs" if you replace the "RelativeWidth" accessor with this:

public float RelativeWidth{ //width of this letter
        get{
            if(isQuad)
            {
                return quadData.size.x * (size);
            }
            else
            {
                return chMaxX * (size / chSize);
            }
        }
    }

That should fix it! I'll make sure this gets out in the next patch.

It is works. Thanks