Search Unity

Rootmotion from animations.

Discussion in 'Animation' started by Guile_R, Aug 19, 2016.

  1. Guile_R

    Guile_R

    Joined:
    Dec 29, 2012
    Posts:
    53
    Hi,

    I have been struggling a bit as of late with the newer versions of Unity. At some point down the line when bringing animations with locomotion to Unity I have been unable to compute positions in the 2D Blend Trees. It may be due to a few warnings I have in the Animation window where 'Animator.Motion Q and T are missing and the same goes for the Animator.Root.

    As far as I understood in order to avoid these errors I should have my root bone at the top of the model hierarchy. The issue is whenever I reorganise my parenting in 3ds Max by having the root bone at the top of the chain when I import it into Unity this bone is gone. I do have a parent using the file's name but that does not seem to contain the root animation nor be available in the drop down menu in the Import Settings Rig tab to be used as the root node. In the Animations tab though I can select the <Root Transform> but it does not show movement at all.

    I can get the animations working with root motion by having my skinned meshes not linked to the root node which would consist in a hierarchy of a parent-> skinned meshes and bone structure. Using the root node of this bone structure I can get the animations working dandy with root motion but cannot compute positions in the blend tree which is causing issues as I have to guess their positions (educated guess but nevertheless).

    I have been binding through code my navmeshagent and the root motions and that's where the issues are becoming visible as even if the agents desired velocity vector is a straight line the animations angular velocity values are a tad off (based on my guesses) and the agent is not coming on a straight line but rather zig zagging towards its goal.

    Anyone here could give me pointers on why Unity is refusing to compute positions in my blend trees even if the hierarchy is identical between all my models? I have split animations between models as it helps with my Max workflow.

    Many thanks.

    G.