Answered

Two handed animations for gun

Anonymous 2 years ago updated by Peter - Soxware Developer 2 months ago 3

Could you give an overview of the workflow for creating a two handed weapon animation where the second hand should be parented to the weapon? I have tried simply parenting the second hand but as soon as I key the parent, the hand jumps out of position.

UMotion Version:
Unity Version:

Answer

Answer
Answered

Hi,
thank you very much for your support request.

If you create this animation only for a single character (and don't want to share the animation with other characters), I recommend using a "generic" rig setup instead of "humanoid". Animations of type generic have higher quality but can't be shared with other characters (except if they have precisely the same skeleton). More information about humanoid: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

If you want to use humanoid, be aware that there might be some small offsets/differences when the animation is played in game due to the lossy nature of the animation re-targeting of the humanoid animation system (probably not noticeable for the player due to camera distance).

  1. Anyway, before you start with UMotion, make the gun a child of the right hand.
  2. Create a new UMotion project and drag the character to the Pose Editor.
  3. Switch into Config Mode and run the IK Setup wizard.
  4. Stay in Config Mode and select the IK handle of the left hand.
  5. Open the "Constraints" tab and disable "IK Pinning Mode" in the "Child-Of Constraint".
  6. Switch back into Pose Mode.
  7. Bring the left hand into the pose where it correctly grabs the weapon.
  8. When you have the left hand's IK handle selected, you can now set the axe as parent (see "Channels"). Key everything.
  9. Set "none" as parent when you want to switch into one handed mode.

I recommend watching the Child-Of video tutorial before using it. There are some common pitfalls you should be aware of.

Please let me know if you have any further questions.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

If you create this animation only for a single character (and don't want to share the animation with other characters), I recommend using a "generic" rig setup instead of "humanoid". Animations of type generic have higher quality but can't be shared with other characters (except if they have precisely the same skeleton). More information about humanoid: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

If you want to use humanoid, be aware that there might be some small offsets/differences when the animation is played in game due to the lossy nature of the animation re-targeting of the humanoid animation system (probably not noticeable for the player due to camera distance).

  1. Anyway, before you start with UMotion, make the gun a child of the right hand.
  2. Create a new UMotion project and drag the character to the Pose Editor.
  3. Switch into Config Mode and run the IK Setup wizard.
  4. Stay in Config Mode and select the IK handle of the left hand.
  5. Open the "Constraints" tab and disable "IK Pinning Mode" in the "Child-Of Constraint".
  6. Switch back into Pose Mode.
  7. Bring the left hand into the pose where it correctly grabs the weapon.
  8. When you have the left hand's IK handle selected, you can now set the axe as parent (see "Channels"). Key everything.
  9. Set "none" as parent when you want to switch into one handed mode.

I recommend watching the Child-Of video tutorial before using it. There are some common pitfalls you should be aware of.

Please let me know if you have any further questions.

Best regards,
Peter

I take it that the character must be in the default 'A' pose?

I had previously moved the hands to hold a sword laying on the left shoulder. So the pose rig and the IK rig dont align together.

It helps during setup if the character's pose in config mode (i.e. the "reference pose") is a "T" or "A" pose as it makes it easier for UMotion to automatically set up IK in the IK setup wizard.

During animating, the character can be at any pose. Using the "Set IK to FK" and "Set FK to IK" buttons in the pose editor, you can sync the IK to FK  or FK to IK poses. Please refer to the manual for further information about how these buttons work. Click on the black info icon in the pose editor's UI to quick jump to the related section in the manual.

Let me know in case you have any follow-up questions.

Best regards,
Peter