• RuntimesUnity
  • Skeleton animations for multiple characters

Dear Community Members,

I hope you can help me with a little challenge. I am currently working on a project where I want to animate four different characters with slightly different proportions, using a single skeleton. My goal is to be able to differentiate these animations from each other in Unity so that I can play them as needed.

Specifically, how do you go about animating one skeleton for multiple characters and then differentiating the animations in Unity. Here are the steps I would like to understand:

Create a skeleton How do you build a skeleton that works for all four characters? Are there any special considerations or techniques you guys take into account when doing this?

Attaching Sprites to Bones: How do you attach the sprites to the bones of the skeleton? Are there any best practices to make sure the animations go smoothly?

Differentiating animations in Unity: How do you go about making sure you can control the animations for each character separately in Unity? What Unity features or techniques do you use to do this?

Thanks in advance for your dedication and valuable time!

With kind regards,
Trilex

    Related Discussions
    ...

    Trilex If you have not seen this blog post, I suggest you take a look at it first:
    http://esotericsoftware.com/blog/Skin-constraints-for-different-proportions

    As described in the blog post above, skin constraints can be used to change the proportions of the skeleton by simply switching skins. This could eliminate the need to prepare animations for each character in the first place. In other words, the same animation could be used for all characters.

    As for attaching Sprites to the skeleton's bones, the easiest way to do this is to use the BoneFollower component: http://esotericsoftware.com/spine-unity#BoneFollower
    If you want to replace an image attachment in a particular slot with another image, you may want to refer to Spine Examples/Other Examples/Mix and Match Equip, which is included in the spine-unity runtime.

    Hello Misaki,

    thank you very much for your information. I read the blog and followed the steps described in it. It helped me a lot to understand the principle better!

    In summary, I use the "skin constraints" to make the skeleton bigger, thinner, thicker or smaller depending on the character. This way I don't have to create a separate skeleton for each character, but can scale the skeleton.

    With the "BoneFollower" component, I make sure that the sprite follows the bone and always stays on that bone.

    For example, if I wanted to create a skin for a character, I would use the "Spine Examples/Other Examples/Mix and Match Equip" feature to do a sprite swap.

    As you can tell, this is my first time working with Spine today and I'm trying to understand the logic behind it. Please correct me if I misunderstood something.

    Thank you very much for your help!

    With kind regards,
    Trilex

    Sounds like you are getting it. A couple notes:

    Using skin constraints is nice because you can see it in the editor, but you can adjust bones at runtime. That comes in handy in some situations.

    A different look for the same skeleton is typically done with skins. At runtime you'd create multiple skeleton instances and set a different skin on each one.