• Tutorials
  • [Editor] Holding a two-handed weapon

Related Discussions
...

weapon  Loading Image

Ever wondered how to create a setup in Spine that would allow your character to hold a weapon, but also throw it away if needed? Wonder no more! We'll explain step-by-step how to do exactly that in this blog post.

Blog: Holding a two-handed weapon

Hello,
I've been trying this and I'm not getting the same result. For me to have the same result I need to have the Mix setting for the IK constraints at 100 and not at 0. The moment I turn to 0, they become normal bones, both in Setup and Animation mode.

6일 후

This forum needs an upgrade with new features as "thank you" button and so on
thank you
Cristian

We just assume all of Erika's posts get a gazillion "thank you"s.

한 달 후

Hi! Thank you for the guide! I'm new to constraints, so any info is very useful 🙂

I'm using a similar setup for a character holding a shotgun, but with two single-bone IKs on the arms for separate elbow movement. Right now I'm trying to create an animation, where he taps the shaft of the gun on the palm of the far hand. The problem is that when I detach the hand from the gun by keying the mix slider to 0, the hand moves back to its original position, when I need it to stay in place. If I also key the hand to move back into place at the same time, I get weird wobbly movement where it goes up and then comes back down.
I was wondering if there is a way to detach the arm from the weapon, keeping the hand in the same position, that I am missing?

Thank you for your time and attention! 😉

Upd: I got an idea while writing down the question here, however it feels more like a hack than a proper solution.
While a bone is constrained it can't be moved directly by the move tool, so I can't chose where it is supposed to be positioned when the transform mix will be turned off. However, I can key the transform to 0 later on in the timeline, then move the bone in question to the place, where it's supposed to end up, key that position and then copy or move that key back to the place on the timeline, where the transform constrain is still on.
It feels almost as if I'm abusing a bug, but this method seems to work for me. Hope this helps someone else!

Hi Mudoxy,

Now I'm curious, why did you separate into two IKs your arms? Wouldn't just placing a one bone IK on the last bone be pretty much similar?

Sometimes activating a constraints after another one may result in the previous constraint not working as expected anymore (because the new constraint modifies the position of the previos constraint target after calculating that constraint), in these cases reordering the constraints may help get the result you want.
Constraints: Order

Of course if you can post a gif/video of the wobbly movement it may be easier to understand the issue you were facing.

By the way, what you described is not a hack nor a bug! You can set the influence of a constraint to 0, adjust the position of the bones then turn it back on to retain that position and so on! I think switching from inverse kinematics to forward kinematics on need is definitely good when the occasion requires it. Sometimes a foot needs to stick to the ground (or arm to a weapon), sometimes it is influenced by the body instead and that's ok!

5일 후

Hi Erikari!

That makes a lot of sense, thank you for the explanation 🙂
The character I was animating was facing front, and his elbow had to move back and forth, simulating perspective, so both the shoulder bone and the forearm had to be scaled quite a bit. I figured the easiest way to deal with this would be by creating 2 IK's, so that the hand would follow the weapon, and then moving the elbow IK constraint bone movement scale both the forearm and the shoulder to match its position. I'm sure there is an easier way to do this, but since I'm new to IK-ing, I didn't have any better ideas at the time.

5일 후

That is so cool. And exactly the right ref for what I'm doing! I love the way he uses extra joints for more complex mechanics, even though I don't yet understand half of then, this is great inspiration to try making more complex rigs. Awesome! Thank you, Erikari!