Answered

Confused about PickUpAnimation Best Practices

Anonymous 3 years ago updated by Peter - Soxware Developer 3 years ago 1

I've examined the included "PickUpAnimation" UMotion Project.

I've been able to reproduce with my own character and a cube object...

I am unable to use the "Child of" Constraint with my own inanimate object when working with a Knight and his sword.

The error I get reads "Animating generic objects that have no humanoid bone in their parent hierarchy is not supported". 

  1. What does this error mean?
  2. How must gameObjects (swords, guitars, rocks, whatever) be prepared to work with the "Child of" constraint?
  3. Where within the UMotion character hierarchy must the gameObject be placed (as a child of the bone skeleton, as a sibling to the skeleton)?

What are the best practices here?

UMotion Version:
Unity Version:

Answer

Answer
Answered

Hi,
thank you very much for your support request.

The humanoid avatar maps bones from your character to a pre-defined "humanoid bone". For example a bone named "Character0001_Bone0" might be used as the "Hips" bone. This mapping is done automatically when Unity imports your character as "humanoid", but you can adjust or view this mapping when clicking on the "Configure..." button in the "Rig" tab shown in the inspector of your FBX file. This opens the humanoid avatar editor.

So in other words, your sword must have a parent that is such a humanoid bone (e.g. a child of the hips,...). Which bone you want to choose depends on your use case. If you are primarily making fighting animations, you might want to make the sword a child of the right hand. There are also valid reasons to have two swords (one on the back and one in the right hand), then use a custom property constraint to animate alter the visibility of those as needed. It really depends on the technical requirements and your exact use case.

Adjusting the hierarchy needs to be done outside of UMotion (--> click on "Clear" in the pose editor to temporarily remove the character from UMotion). Then once you've changed the hierarchy, re-assign the character to the pose editor. Then go into config mode and click on "Cleanup" to remove the reference to the old position the sword had in the hierarchy.

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

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

The humanoid avatar maps bones from your character to a pre-defined "humanoid bone". For example a bone named "Character0001_Bone0" might be used as the "Hips" bone. This mapping is done automatically when Unity imports your character as "humanoid", but you can adjust or view this mapping when clicking on the "Configure..." button in the "Rig" tab shown in the inspector of your FBX file. This opens the humanoid avatar editor.

So in other words, your sword must have a parent that is such a humanoid bone (e.g. a child of the hips,...). Which bone you want to choose depends on your use case. If you are primarily making fighting animations, you might want to make the sword a child of the right hand. There are also valid reasons to have two swords (one on the back and one in the right hand), then use a custom property constraint to animate alter the visibility of those as needed. It really depends on the technical requirements and your exact use case.

Adjusting the hierarchy needs to be done outside of UMotion (--> click on "Clear" in the pose editor to temporarily remove the character from UMotion). Then once you've changed the hierarchy, re-assign the character to the pose editor. Then go into config mode and click on "Cleanup" to remove the reference to the old position the sword had in the hierarchy.

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

Best regards,
Peter