# How do I organize and sync multiple animated sprites in Unity2D?

I have a human with three parts: legs, body and head, 2D, top down view (GTA 1-2 alike). Head does nothing, legs have walking animation and body has 2 animations: walking animation (moving hands which match with legs animation) and some additional animation. I have 3 gameObjects with SpriteRenderer, for each part, stored in parent. How do I animate all parts synchronously so that if human walks, then does additional body animation while legs are walking and returns to body walking animation so that if e.g. legs play 5th frame of its animation, body also plays its 5th frame, not 1st. Is it possible and if yes, then how? Also, do I need separate Animators for each body part or only one?

## 1 Answer

I think rather than having separate animations for each body part and then trying to sync the whole animation cycle. Its better to have one single animation for walk cycle where all the parts are moving in sync. And then add additional layers of animation on top of base layer which can override animation on some part of the body ex. waving hands while walking, nodding head etc. You can also use IK to get a specific result depending upon the environment.

Follow these links you will get some idea

• My human is pixel-art 2D-sprite with top down view (GTA 1-2). I have just frames and I doubt I can use IK here... Nov 14 '15 at 7:33
• I had single human before, but in that case I couldn't overwrite e.g. only hands. Nov 14 '15 at 7:46
• In such case ignore IK , stick to creating a sync animation for entire walk cycle. And over ride body animation if needed. Nov 14 '15 at 21:32
• This was my question, how to achieve that? Do I need separate Animators, and if so, how to sync them? Nov 15 '15 at 4:59
• Nope thats not true you can animate the children also. Nov 15 '15 at 9:26