Answered

How to edit animations where humanoid is holding an object?

goldfire 1 month ago updated by Peter - Soxware Developer 1 month ago 3

There are lots of different objects in the game that aren't part of the humanoid rig and are their own standalone objects. However, the players can pick these objects up, which is executed with an IK pickup animation that then re-parents the object to the hand bone. This all works fine; however, it gets complicated when I want to create animations based on that object holding pose. Since that object isn't part of the rig, I get an error when trying to load the animation project with the object as a child of the hand (`Human bone mapping for human bone "Right Thumb Proximal" is not unique: Found multiple transforms named "ORG-thumb_01_R".`). I can of course edit the animation without the object in hand, but it becomes very difficult to align fingers, etc correctly with relation to the object in that case. What is the recommended approach to handling this type of workflow?

UMotion Version:
1.22p08
Unity Version:
2020.1.2

Answer

Answer
Answered

Hi goldfire,

thank you very much for your support request.

What is the recommended approach to handling this type of workflow?

You're approach is correct. The question is, why are there at least two transforms named "ORG-thumb_01_R" in your character's hierarchy (at runtime)? Try to fix that and your approach should work fine.

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

Best regards,
Peter

Answer
Answered

Hi goldfire,

thank you very much for your support request.

What is the recommended approach to handling this type of workflow?

You're approach is correct. The question is, why are there at least two transforms named "ORG-thumb_01_R" in your character's hierarchy (at runtime)? Try to fix that and your approach should work fine.

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

Best regards,
Peter

The thumb is because the IK pickup object needs a copy of the hand bone as the target (using Final IK). I tried setting that bone to inactive in the pickup event, but the error still happens. i can just delete the bone manually in play mode and then drag the character into the pose editor, but that then adds the object to the rig configuration. Then, I have to go find it in the hierarchy and show its transforms to be able to tweak the position of the object. Tweaking the position of the object then applies those properties to the animation clip, which obviously isn't desired (the position/rotation is set when the object is re-parented). Also, since I can't select the object, I can't get its local transform position/rotation to re-use those values. In addition, if I have dozens or hundreds of items, those are all going to end up as non-existent objects in the UMotion project's rig configuration. None of this seems ideal, but I gather there is no easy/clean way to handle this?

The thumb is because the IK pickup object needs a copy of the hand bone as the target (using Final IK).

You could just re-name that duplicated hand bone transform (--> e.g. "Right Hand IK Target").

i can just delete the bone manually in play mode and then drag the character into the pose editor, but that then adds the object to the rig configuration.

Your parenting script could give picked-up objects a generic name e.g. "PickedUpItem". Then in UMotion you only get one transform added to your rig-config (no matter how much different objects you are editing).

Tweaking the position of the object then applies those properties to the animation clip, which obviously isn't desired (the position/rotation is set when the object is re-parented).

If you don't want your position/rotation changes to be written to the animation clip, then why do you even want to change the position/rotation?

Also, since I can't select the object, I can't get its local transform position/rotation to re-use those values.

If you adjust your pickup script as mentioned above, you should be able to assign your character at paused playmode to UMotion. Then it should be possible to select the item too.

In addition, if I have dozens or hundreds of items, those are all going to end up as non-existent objects in the UMotion project's rig configuration.

This can be avoided if they all get the same name as soon as they are parented (see above).

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

Best regards,
Peter