Answered

Two handed animations for gun

Anonymous 5 years ago updated by angeloT813 2 months ago 6

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

Hi there, I'm trying to follow this approach in my project and having some issues.

I have a Humanoid Umotion project with a tennis player with a two handed animation. The tennis racket is a child of the right hand and I would like to make the left hand follow the racket also.

I have added a child of constraint to the racket in config mode and I have also disabled IK pinning on the left hand IK handle.

In Pose mode, the parent object is always greyed out.

Any help would be appreciated,

Thanks, 

Adrian

Hi Adrian,

thank you very much for your support request.

You must be in the base layer to modify the parent property (currently you have an additive layer selected).


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


Best regards,
Peter

i too am having an issue with 2 handed weapons. I'm using a rifle and the rifle is a child of the right hand. the animation is a custom mocap I did but the left supporting hand moves a bit. so i tried to make the left hand a child of the weapon and it worked fine until i tried to Unparent the left of from the weapon to do a call sign type motion. the hand no longer follows the animation motion it just stays in mid-air.first image shows keyframing the parent, second image shows unparenting the hand to do the call sign motion, this is all in the base layer. i also tried an override layer 

Image 1464

Image 1465

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