need help with how to handle spear combat animations

can somebody pleeease direct me to some tutorial for how to handle a character wielding a spear or staff or similar two-handed weapon of this type? I’m trying to make animations for a game and I’m totally stuck on this. I could try to manually move the spear bone around but I’m confident there’s some semi-automatic system for this (probably using constraints.) I haven’t been able to find help with this myself, though. :frowning:

sorry if this is the wrong forum to post this request D:

I don’t know of a tutorial, but the method I use is to make a separate bone for the weapon, that has its tail at the mount point of the first hand and its head at the mount point of the second (sliding) hand. Add a Child Of constraint to this bone with the first hand as the target. Using a Child Of rather than a bone parent means you can release the weapon by setting the influence to 0.

Then add an IK constraint to the weapon bone with a small IK target on “sliding” hand. This allows you to move the hands and keep the weapon fixed in one hand with the other able to slide down the weapon. You can then set the Child Of influence to 0 and the weapon IK to 0 and “throw” the weapon by moving the weapon bone. There are no fingers in this rig, but this is just to show the principle, you can add more bits to make it a more realistic rig.

Moving both hand IK targets together enables you to keep the weapon in one attitude. You can add more constraints and further enhance the link between the hands if you want, but see how you go with this. You can also rotate the “sliding” hand around the fixed one by adding a copy rotation constraint and set its influence to 0 when you do not want it active for example. Hope all this makes some sense!

Cheers, Clock. :slight_smile:

Here’s the blend file I used for the image above:

weapon.blend (475 KB)

wah, i should have been more specific, sorry. D:

I did already figure that part out. My real problem is allowing the spear to be a child of two things: either the hand or the sheath bone. I want the spear to be resting in a sheath on her back when she’s not using it. I tried using a child of constraint for the hand and the sheath bone but it seems like there’s only one inverse allowed and they fight over it. I tried just parenting the spear bone to the sheath bone and using only one constraint to attach the spear to the hand, but whenever the sheath bone was moved (or when the spine bone it was parented to moved) it would add translation to the spear bone and ruin the animation.

here’s my rig

Ahah! being specific is always a good thing!

You can have multiple Child Of constraints on any object and change their influence value from 0 (inactive) to 1 (active) by either using Drivers linked to a Control object, or by simply going to the required frame in the Timeline, then enter the influence required in the influence field, RMB-Click the Influence field and select “Insert Single Keyframe”. That way you can pass the weapon from being a Child Of one object to being the Child Of another. I have never had issues with two constraints that have Inverse on one and not the other or Inverse on both. In case you haven’t tried that yet also, in which case I would need to see the blend file before I comment further to save myself any more embarrassment…

I use multiple Child Of constraints to move a camera from one track to the next for example, in one project I have 6 camera tracks with objects moving down each track, I then have 6 Child Of cons and 6 Track To cons on the camera and a control bone that when I move it from X = 0 to X = 6, it progressively moves the camera locations from one track to the next and also moves the camera focus point to look at the required new object. Passing the influence over a period of frames results in the object being smoothly passed from one location to the next rather than just jumping the influences across one frame.

You can keyframe any Text Entry box, such as Influence boxes or Transform boxes, etc. by RMB-Click the box and select “Insert Single/Multiple Keyframe(s)” as appropriate - changing constraint influences is a really useful tool.

Cheers, Clock.