2
$\begingroup$

I have 3 bones (in the same armature) a sword, a sheath and a hand

So I put 2 constraint (childOf) to the bone of the sword. One, attached to the bone of the sheath and the other to the hand. Now, if I move the bone of the sword (in pose mode) to the hand and set the reverse, the influence of the 2nd constraint will also change the position in a maner that the sword can't come back in place in the Sheath.

That sounds really simple but I have no clue how am I suppose to do that :\

$\endgroup$
1
$\begingroup$

You can animate the influence of both constraints simultaneously. And don't move the sword if it has already set it's offset to parents. Just place your hand to the sword's handle, keyframe sword's 'hand' constraint influence at 0.0, and its 'sheath' constraint influence at 1.0, and then at the next frame, flip the influence, and keyframe them again ('hand' becomes 1.0, and 'sheath' becomes 0.0). You can use the gradual influence switch (not the next frame, but a few frames delay).
If you have to rotate the sword during the battle, all you need to return it to the sheath is to restore it's original rotation first (duplicating keyframe in the dopesheet or copypaste pose for that bone at different frames).


I don't know how does your sheath work, and as you say, the sword jumps into the hand. See attached blend, how I understood it.

$\endgroup$
  • $\begingroup$ But my character don't grab the sword, it comes to his hand :( $\endgroup$ – Richard Jan 11 at 21:57
  • $\begingroup$ So I guess, in my situation, there's no other way than copy/paste the sword coordinate in the sheath when I want it to come back? $\endgroup$ – Richard Jan 11 at 21:59
  • $\begingroup$ can you show the effect you're trying to achieve? like some pictures, or maybe animation, or some movie fragment? $\endgroup$ – Mechanic Jan 12 at 5:48
  • $\begingroup$ That's what you show in you blend file, Thanks. Your sword is not attached to a bone, I guess it's the reason why it didn't work for me? $\endgroup$ – Richard Jan 12 at 14:58
  • $\begingroup$ Wait no, I don't understand :( If (in your file) I put the hand back in T-pose (alt-r alt-g) set the constraint to sheath to 0 and the one of the hand to 1, the sword go mid course. But in your animation, the sword go to the hand.. How? :( Edit : Ok, so it can only works during animation by moving the sword in addition to the constraints changes. That's good enough for my needs $\endgroup$ – Richard Jan 12 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.