Search Unity

Beginner - Attempting to animate 2D pixel art character with game objects for each body part.

Discussion in 'Animation' started by jungle_, Oct 30, 2020.

  1. jungle_

    jungle_

    Joined:
    Sep 13, 2020
    Posts:
    17
    I am attempting to animate a character in Unity with art drawn in Asperite. I have each body as a child of the parent Player game object. I also have the spritesheets with each body part in them. The example below is me trying to create a walk down animation where I am running into issues with the pixels not lining up each frame.

    I am doing this because I want to be able to easily equip weapons/armor to each individual body part.

    Frame 1:

    Frame 2:


    Frame 3:


    I've attached the spritesheet as a file so to see how the individual sprites are sliced.

    As you can see, due to how inconsistent each sprite size/position is it shifts by some amount when each new sprite is loaded. They fit together fine in Asperite, but it's not coming together in Unity.

    Has anyone ever created a character like this before? Any help/tips?
     

    Attached Files:

  2. Holonet

    Holonet

    Joined:
    Aug 14, 2017
    Posts:
    84
    Hmm, that PNG doesn't show how they fit together in Aseprite, maybe the .aseprite file to show the animation?

    But if you put a 16x16 (which it seems you are using) grid on in Aseprite, they don't line up, so if you used grid slice in Unity, then it looks like it would be off because the image is...and if you used auto slice, then I imagine there would be issues if the sizes/boundaries of the sprites are not all perfectly consistent.

    That said, I don't have a clear picture in my mind how you want to animate with the body parts as children like that. I see what you mean w/ the weapons, but dunno what sort of workflow you had in mind.

    If you are needing the body parts to be animated separately, I would suggest using Unity's 2D animation tools, like this fella shows:


    To do that, you need a .PSB file (NOT .PSD). If you don't have Photoshop, you can export to .PSD from Gimp, then just rename it to .PSB and that should be good enough to import into Unity.