Is there something like a 2d equivalent to the avatar body mask? / Any way to create an animation for an arm attacking that's independent from the body (in 2d)?

Hi there! I’m new to Unity, so I apologize in advance if this question is a bit stupid and the answer obvious.

I’m trying to make a simple fighting game in 2d, using the recently launched native 2d tools. The game uses a classic side view and the characters are made of different parts instead of being just one sprite (think cutout animations). Basically they’re head + body and legs + arm holding a sword, stacked in that order and parented to a gameobject.

What I want to know is if there’s a way to animate body and arm separately. Is there something like a 2d equivalent to the avatar body mask that exists for 3d? I just want to have the arm in one “layer” and the rest of the body in a different one, so I can create idle and an attacking animations for the arm that are independent from the body, and have the character/body have its own idle, running and jumping animations.

In other words, what I’m asking is if there’s a way to make the character attack (swing a sword) while standing still, running or jumping without having to make whole body animations for each combination (running and attacking, jumping and attacking and standing and attacking).

I hope the question was clear enough (english is not my first language), and thanks in advance for any help you could provide!

There is a way, take a look at the Unity 2d Tutorial here and pay attention when they are explaining the animation of the cannon… if im not mistaken (i can’t check it now because im at work), he uses a Layer for the animation of the cannon so he animates regardless of the body animation.

I’m interested too! Any new about it in 2020?:slight_smile:
What I would need to is to set up a proper rig 2D model with IK. In order to be able to use OnAnimatorIK()
method and manipulate animations in runtime.

Is there a solution?
The video that @Vitor_r gave does not say anything about it