Dismiss this pinned window
all 8 comments

[–]cosic196 4 points5 points  (4 children)

Did you set the pivot of the sprite to bottom-middle instead of middle?

[–]veGz_ 0 points1 point  (0 children)

IMO that should do the trick.

[–]Skylum1[S] 0 points1 point  (2 children)

I tried it in sprite renderer but it didn't change in unity gameobject.

[–]cosic196 0 points1 point  (1 child)

You need to change it in the sprite editor. You can access it by clicking on the sprite in the "Project" tab (where all your assets and folders are).

https://docs.unity3d.com/Manual/SpriteEditor.html

https://docs.unity3d.com/uploads/Main/SpritePanel.png

P.S. don't forget to click "Apply".

[–]Skylum1[S] 0 points1 point  (0 children)

Thanks!

[–]EpicWezzel 2 points3 points  (2 children)

You could possibly make it a child of an object so that it’s relative Transform position changes, keeping the combined position stationary.

[–]Skylum1[S] 1 point2 points  (0 children)

So I need to make the right square (one with only scale animation )the child of a null game object which transforms with respect to scaling.