Animating multiple body parts 2d

Hello.

Take a 4-directional 2d character (like a top down character). Imagine instead of one sprite, you have a sprite for each “body part” of the character.

How do you create a controller for such a character? The side-scroller method does not work because if you press Horizontal and vertical at the same time it mixes the animations together.

I’m thinking the only way for this to work is to code a robust system for it specifically.

Use multiple animators, each controlling different variables. The parent level animator can control the overall position of the various child objects and the child animators can handle specifics such as how to animate that specific piece when facing a certain direction, moving a certain speed, etc.

This also make the child animators very reusable so you can apply them to other objects with often zero changes.