- Edited
Spine and Unity - Avatar Mask
hello I'm creating a character for my game. I would like to get an effect in which my character can shoot, receive damage, etc. while moving. I have prepared some animations. Just moving, shooting, jumping, etc. I would like to get the effect in which the character moves and shoots. At the moment, I animated the layers and the "Weight" parameter, but unfortunately the animation does not synchronize well enough. Unity provides an Avatar Mask option. I would like to exclude some bones that are causing the animation problem. Is it possible and how to do it?
If this cannot be done, please help me get the effect in which the character goes and shoots and at the end of the animation there were no strange jumps.
Thank you for your help
I'm afraid there is no easy way to achieve an Avatar Mask like effect programmatically. You could of course modify the runtime code accordingly, but this is not an easy solution.
The simplest and cleanest solution would be to create separate animations when you don't want all bones involved. Basically Avatar Mask
will do just that at runtime which you could as well do in the Spine Editor.
If you don't want to create duplicate animations or modify them in the Spine Editor, you could write a script in Unity that creates duplicates of your desired animations (the AnimationData
) and then remove certain timelines that target your excluded bones.