Setting the pivot of a sprite (SOLVED)

Hello everyone!
I want to make a simple 2D platformer in “retro pixel style”.
But I have a problem: when I try to place my sprites in the object editor it happens that the pivot of my sprite is in the middle of one pixel, so it is impossible to place the sprite 100% percise to another one without either having a gap or overlaping.
Of course I am using the snap function of the grid, but the problem is that it always snaps to the pivot of the sprite which is placed in the middle of a pixel.

So my question is how to replace the pivot of a sprite.

Greetings from germany
Luca

2 Likes

Hi, Luca!

You can create your own “pivot point”. Just create root go, add sprite component to it, and set position to x: width/2, y: height/2. Now your pivot of sprite in the left down corner.

Set sprite’s position(left) and use it in collection(right):

6 Likes

Thank you very much!
That helped me a lot!

1 Like