Answered

Tool (child of right hand joint) animates in Clip Editor but not in editor play mode (Mechanim)

photonic 3 months ago updated by Peter - Soxware Developer 3 months ago 6

Hi Peter,

I have tweaked a human animation (mining with a pickaxe). 

The pickaxe is child of the right hand joint and animates in the Clip Editor but not in editor play mode (Mechanim) after export as anim file.

I have added the "child of" constraint to the axe and keyed it to the right hand parent, but still, when I view the animation in play mode the pickaxe just stays in T-pose place.


CLIP EDITOR Animation


PLAY MODE Animation


I've tried saving the keyframes on the base layer as well as on an Override Layer .. nothing helps

Thank you for any support!

UMotion Version:
1.26p01
Unity Version:
2019.4.18f1 LTS

Answer

Answer

OH MAN,

I just solved this! Out of some unknown reason the pickaxe gameobject was checked as static.


So, thanks a lot for bouncing this stupid issue back and forth.

Keep up your great work - your tool is absolutely awesome.


GOOD, I'M SATISFIED

Thanks for the lightning-fast support. Your tools are amazing.

Satisfaction mark by photonic 3 months ago
Answered

Hi,

thank you very much for your support request.

I currently can only think of 2 reasons why your axe is not animating in play mode:

  1. If it has a different name or a different position in your character's hierarchy in play mode than it had while animating in UMotion. In that case, the animation system won't be able to bind the animation curves of the axe.
  2. If a script overrides the position/rotation of the axe in LateUpdate().

Does the animation (the exported *.anim) play correctly when played via Unity's native animation window (during edit time)?

Best regards,
Peter

Thank you for your lightning-fast answer!
Yes, it shows correctly in the inspector preview window and there is no script attached to the axe.

It has a LOD group though with two different LOD meshes.

I don't get it.

I've started a new project with the character prefab without pickaxe,

imported the animation (import message: pickaxe not found) and saved the animation to a new anim file.

Then, outside of motion I just added the pickaxe to the character prefab hand as a child. Still not working.

So I opened the project again and selected the character prefab with pickaxe to animate (import message: add pickaxe joints/transforms) and exported the anim under a new name. Doesn't work, too.

At last I added the childof constrain to the pickaxe and parented it to the hand and saved the position, rotation and parent setting on the first keyframe of the base layer. Now the keys show in the anim file but still in play mode the axe doesn't move

???

Thank you for your lightning-fast answer!
Yes, it shows correctly in the inspector preview window and there is no script attached to the axe.
It has a LOD group though with two different LOD meshes.

If the animation shows correctly in the preview window, then the animation file is correct (and UMotion exported everything correctly). So the issue must be in your runtime/play mode environment.

In order to narrow down the issue, instantiate a fresh character (with no scripts attached) in an empty scene. Assign the animation (that works in the preview window) to the character. If you now enter play mode, the animation should play correctly. After that, try to see what's different between your fresh scene and your other scene where it's not working.


Best regards,
Peter

Answer

OH MAN,

I just solved this! Out of some unknown reason the pickaxe gameobject was checked as static.


So, thanks a lot for bouncing this stupid issue back and forth.

Keep up your great work - your tool is absolutely awesome.


Great to here that you've been able to solve the issue. Also thanks for your nice words. I'm glad you like UMotion.


Don't hesitate to contact me in case you have any other issues.


Best regards,
Peter