• Editor
  • Question about dynamic animations

Hey there,

I am in the process of creating a spine animation for my character. After rigging said character I started looking for a tutorial on how to rig/animation characters with weapons. That being said all I found was tutorials where the weapon is in the same project as the character, which is not my case.
I've watched this video multiple times How to Make a Character Aim a Weapon - Spine 2D Tutorial for Beginners, I've also look through and understand the samples provide with the Unity Runtime (the runtime I am using).

In my case, I have a total of 218 weapons which I would prefer using separate from the character spine because I will be using them separately in certain parts of my game (inventory, menus, etc.)

So my question is, how am I supposed to go about animating my character with those 218 weapons. What I mean by animating is mostly; holding, aiming and firing. Surely there is a better way than creating 654 semi-unique animations...

What I mean by dynamic animations, is that would there be a way for me to reuse the same animations for all my weapons but then dynamically change certain parts of that same animation to accommodate the different cases. The main example would be hand placement, all my weapons do not have the same layout, therefore the hands would need to placed in different locations.

Any help is more than appreciated.

  • Misaki и Nate ответили на это сообщение.
    Related Discussions
    ...

    RogueWars You can use Skin constraints for that purpose: https://esotericsoftware.com/spine-skins#Skin-constraints

    For example, to change the position and rotation of a hand to hold a weapon, the hand bones can be constrained with IK constraints, and the IK constraints can be switched from skin to skin, with Skin_A activating the IK constraint for target bone A and Skin_B activating the IK constraint for target bone B, and so on:

    In the animation example above, only the IK constraint is toggled, but if you also use the transform constraints, you can change the position and rotation of the root of the bone, so you can also change the position and angle of the shoulders.

    You could also adjust bones at runtime after you apply animations, but using skin constraints as Misaki described is easier since you can see it in the editor and it's stored in your skeleton data.

    RogueWars That being said all I found was tutorials where the weapon is in the same project as the character, which is not my case.

    Note you can have multiple skeletons in one project, so you could keep all the weapons in the same project. I'm guessing you meant that your weapons are not in the same skeleton as the character. That is fine, some games do that. Delver's Drop uses separate skeletons for the body and head.

    RogueWars I would prefer using separate from the character spine because I will be using them separately in certain parts of my game (inventory, menus, etc.)

    FWIW, you could put the weapons in the character skeleton (eg a skin per weapon), then hide everything except the weapon when you need to show only the weapon.