Mixing animations that use IK and animations that don't use IK constraints

Hi all,

I have a character that is using IK constraints (targeted IK) in animations used to make it look like he’s holding a gun (I followed this tutorial https://www.youtube.com/watch?v=w5Fm-y9B_kk).

These animations work, and import properly into Unity (which I am using to create my game).

I would like to have additional animations without my character holding a gun (such as walking, running, crouching, jumping, etc).

I can remove the IK constraints, which destroys the character’s holding gun appearance, but allow me to generate the proper run/walk animations.

Is there a way in blender where I can have some animations use the IK constraints, and some not use the IK constraints at the same time, specific to the animation?

If there is any information I can provide to make my question more clear, I am happy to do so. Thanks for taking the time to read this.

First, lemme say I don’t know much about game engines, but I don’t think that will matter…

I think what you are looking for is a way to enable and disable the IK constraint, this will have the same effect as removing the constraint, it will just be less work. The easiest way to do this is to use the ik constraint’s ‘influence’ slider. Adjusting that slider to 0 will disable the constraint, adjusting to 1 will have the constraint fully active. Of course, you would have to manually adjust the sliders of the constraints depending upon the action.

You could take this a step further and use a custom property on a bone to control the influence of the constraint. This would allow you to key frame the custom property and the key frame will be part of the action. This way, if you switch from an action that uses IK to an action that doesn’t use IK, the constraint would switch off/on as needed. You can even switch the constraints off/on during the action this way, but I don’t know how that would export to the game engine.

Randy