How to align frames/pivot point in 2D animation

Hi guys, I don’t really know how to get a consistent animation in a “pivot point” standpoint.I mean, my animation are drawn frame by frame, and ingame it seems like the frames are not aligned well !

But how can I have a consistent pivot point when the size of the caracter needs to change ? For exemple :
when my hero is jumping, his legs are getting closer to his body so the player is getting smaller. What can I do to avoid those weird movement between frames ?

Hello @RemDust,

Since You did not post information, wheter You managed to solve Your problem, or not, and 66 people are following, I would share with my recent solution.

I was trying to prototype something with that sprite sheet as You can see, almost each frame is different size, and sometimes “center of mass” of character is also changing.

  1. We can just drag and drop our sprite-sheet to Unity.
  2. Then click it, in inspector select SpriteMode and set to Multiple.
  3. Apply, open SpriteEditor.

Now in left top corner we can set how sheet should be sliced. Automatic one is quite good, but sets also automatically pivot point. Best pivot is probably left-bottom or center. Hit slice and You will have frames.

Here, we can click each frame, select in right bottom menu “pivot”, and set it to “custom”. In X, and Y we set value, where should be our pivot for selected frem. In my sprite-sheet I set manually left leg as pivot in most frames. For running, bottom center. For jumping just center. And so on.

Hope it helped, at least a bit.

Setting up a custom pivot point might not be the right approach, specially if you re-combine sprites multiple times. A pivot that works for one combination might not work for another.

The easiest way I found was to manually set the animation frame by frame to look the way I want, and then in the Animation Tab, at the bottom you’ll find “Dopesheet” and “Curves”.

  1. Go to “Curves”, and then in there, there will be a little diamond icon in the frame in question.
  2. Click on it, and a smaller grayish diamond will appear.
  3. Move that diamond all the way up so it’s vertically aligned with the frame diamond.

You will see now that instead of smoothing the transition between frames, it “snaps”, getting rid of those weird movement between frames you were talking about.

I know it’s been a long time, but it might help someone out there.

Well, it does @Farresto.

thank you.