- Home /
How to achieve this ? ( pivoting) ! (2D sprite)
Hey all,
I am creating something like a cube which can be scaled either sides of the square( in 2D, a sprite). Here I what I wanted graphically:
The idea which I need in my project in a check-list form is shown below:
2D sprite scaling at runtime (Done)
2D sprite scaling at rumtime with a single pivot (Done)
Parented single empty gameobject for scaling through pivot ( as shown in this answer thread (option 2 in accepted answer). (DONE)
Mutliple pivots for dynamic scaling ( Not Done yet) (what I want actually, and shown in fig).
I used every other ideas such as : using all the options in the above mentioned thread's answer, also other code forms like : TextureImportSettings( ) dynamically to set pivots, but it doesn't fits to work here in my case.
Did someone actually did something like this before, please help me achieve this, that would be very helpful.
P.S. : I want just a general idea of what I want to do here actually, just a pseudo text formula, about how you I can achieve this sort of problem.
Thanks.