- Home /
Can I apply legacy animation layer on only part of character body?
Hi everybody, I've been working into a new animation function in our game, and found an issue which I can not resolve with legacy animation system.
The requirement is that, I have a character play "Attack" animation, and which can be switched to "Run" animation before "Attack" was complete, in that case, I hope "Run" animation only affect the lower body, the upper body will continue to play "Attack“ animation till it's over and finally switch to "Run" .
I think "layer" must be used to mark "Attack” animation as a high priority, but "layer" will affect the whole character not only upper body.
How can I achieve my goal?
Comment
You should avoid using legacy animations if possible. They don't have as many features and Unity may not support them in the future. You can probably convert your rig and animations to use a Humanoid (preferable when possible) or Generic Avatar.
There is no built-in way to mask legacy animations in the way you describe, as far as I know. The typical way to do it would be to make an upper body layer in the animator that uses an Avatar $$anonymous$$ask for only the upper body. Then the attack state can be allowed to play for the upper body overriding the lower body animation state.
https://docs.unity3d.com/$$anonymous$$anual/class-Avatar$$anonymous$$ask.html
Your answer
![](https://koobas.hobune.stream/wayback/20220612094850im_/https://answers.unity.com/themes/thub/images/avi.jpg)