Add and animate generic child object in already existing avatar fbx, object won't appear in final animation clip
I have created several voiceline animation clips of a character that I motion captured. The character's t-pose fbx in humanoid is being used as the avatar. During gameplay, the character transitions from an idle state to a specific animation triggered by certain events. However, as the project has progressed, the character now has a voiceline where they grab a letter from the player, look at it, and put it behind their back. The goal is to make the letter visible at the right moment, move along with the character's hand, and disappear when it is put behind their back.
To achieve this, I am using Umotion to match the letter's movement with the character's hand and set its scale to 0 when it should be invisible. The envelope has been added as a child object of the hand bone in the character's prefab.
While the animation is working fine, when I export the clip, I only have the humanoid rig animation, and the letter is missing. The letter is visible and functioning correctly in the Umotion project, but not in the exported clip.
Question: How can I include an animated gameobject in the exported clip of my character's voiceline animation?
Answer
Hi,
thank you very much for your support request.
Question: How can I include an animated gameobject in the exported clip of my character's voiceline animation?
If you have created key frames for your extra game object in UMotion, and then hit export, UMotion should include those extra keys into the exported animation. You can check this, by opening the exported *.anim file with Unity's built in Animation Window. On the left side of the Animation Window, you should see the transforms of your extra game object listed that you've created key frames for.
To further debug, why the animation isn't played correctly in your scene, first verify that you've assigned the correct animation to your character.
Then select your character while you have the Unity Animation window open. Are there any transforms displayed in yellow? That would mean that the animation clip can't find those transforms (this can happen if this transforms/game objects are at a different position at the time you animate via UMotion vs at the time you play your animation).
Best regards,
Peter
Hi Peter! Thank you for your quick response and taking the time to address my question.
I'm afraid I did not provide a clear explanation of my current setup and problem.
I have a character avatar and several voiceline animation clips. These clips override the idle animation of the character whenever a specific voiceline or animation is triggered. Now, I want to incorporate an animation where the character grabs a letter from the player. Since the letter was not part of the avatar's prefab, I added it to the hand bone.
I then animated the letter in Umotion to match the hand movements in the existing animation I created in Maya. However, when I export this new Umotion clip, I am unable to make the animation play on the letter as well.
I have included a video demonstrating the animation with the floating envelope and a screenshot of the project. In the screenshot, you can see that I have the envelope object in the Clip Editor with keyframes. (Please note that I quickly set up this animation for testing purposes, scaling it from 0 to 1 to make it visible, rotating it once, and scaling it back to 0 to make it invisible.) Additionally, in the screenshot, you can see that I have attached the letter to the hand bone.
I've also tried to add the same Animation Controller from the character to the letter, it still does not move.
I hope this clarification provides a better understanding of the issue. Thank you for your assistance.
The exported animation needs to be assigned to the AnimatorController of the character. And the letter needs to be a child of CC_BASE_L_HAND also at runtime.
Also make sure to follow the steps I've mentioned in my original response:
If you have created key frames for your extra game object in UMotion, and then hit export, UMotion should include those extra keys into the exported animation. You can check this, by opening the exported *.anim file with Unity's built in Animation Window. On the left side of the Animation Window, you should see the transforms of your extra game object listed that you've created key frames for.
To further debug, why the animation isn't played correctly in your scene, first verify that you've assigned the correct animation to your character.
Then select your character while you have the Unity Animation window open. Are there any transforms displayed in yellow? That would mean that the animation clip can't find those transforms (this can happen if this transforms/game objects are at a different position at the time you animate via UMotion vs at the time you play your animation).
Best regards,
Peter
Customer support service by UserEcho
Hi,
thank you very much for your support request.
If you have created key frames for your extra game object in UMotion, and then hit export, UMotion should include those extra keys into the exported animation. You can check this, by opening the exported *.anim file with Unity's built in Animation Window. On the left side of the Animation Window, you should see the transforms of your extra game object listed that you've created key frames for.
To further debug, why the animation isn't played correctly in your scene, first verify that you've assigned the correct animation to your character.
Then select your character while you have the Unity Animation window open. Are there any transforms displayed in yellow? That would mean that the animation clip can't find those transforms (this can happen if this transforms/game objects are at a different position at the time you animate via UMotion vs at the time you play your animation).
Best regards,
Peter