Search code examples
unity-game-engineanimationmayaanimator

In unity, use maya exported animation and other anim make animator transition will reset object position


here is my unity project

here is my maya project

here is my old question

in my old question, I use paid unity asset animation occurs same problem, so I make similar animation with maya and reproduce it with free asset

see my gif enter image description here

the bug is when ClimbReachTop finish and play Standing, the object position will be auto reset

when i use similar ClimbReachTop in this asset, the object position will not be reset

enter image description here

so how to make animator transition not reset object position

I'm sure it's not because "apply root motion" since I drag fbx model to unity editor > animation preview, it has not option to select "apply root motion"


Solution

  • update

    as my old answer say, convert root motion animation into control rig, adjust anim, and re-convert to skeleton anim, the root object translate will be messy

    but in many cases, I must convert anim to control rig to adjust it, so when get re-convert root-object-mesey result, I can edit root object in graph editor as my old answer say

    and here is a tip to adjust re-convert anim to make it like ik anim:

    in my case,i wanna change exist anim to root motion anim, convert to control rig to adjust maybe messy anim, so use following way use tmp sphere express ik point(IkReferPoint). key by key, to make sure ik body part translate fixed in specific key range for ex, in walk anim, in specific keys range, I hope leftFoot translate fixed create ikreferpoint in timeline, click key range start key, move ikreferpoint to leftfoot pos to next key, move leftfoot to ikreferpoint pos

    old answer

    update

    I make video, it convert not root motion animation to root motion animation for unity

    attention: if in unity editor side, it still not root motion anim, unity editor > fbx inspector > animations > motions > root motion node > manually specific root motion node(in my anime, it's "root")

    if imported to maya model has not root object, maya > create joint as root object and in outliner move model to root object, here is good tutorial

    old answer

    update

    old answer make new anim work well, but if assign root object as HipsTranslation in hik, bake into control rig, and then bake into skeleton to make root motion, the root object translate will be unexpectely

    so to convert exist animation to root motion anim, here is good tutorial, to exist anim, I can directly adjust root object translate in graph editor

    old answer

    update

    old answer only give a way to make root motion with new skeleton, I find a common way to make root motion with new skeleton or exist skeleton

    make root object enter image description here assign it to HipsTranslation

    when do it, this root object's translate relative with hips will be fixed

    enter image description here

    it my old answer to adjust root object

    in unity, manually fbx anim root object as motion > root node

    enter image description here

    old answer: following is just a way to make new skeleton

    I find the solution, i should make root motion anim in maya

    here is video tutorial

    in short, in maya I should make root motion animation with root object, and in unity editor exported fbx animation inspector > animation > motion > root motion node > manually select my created root object

    in unity animator transition, when one animation play finish and play next anim, character transform will be determine by this fbx anim root object

    what is root object? in in my screenshot, it's vertical line from ass to bottom)

    enter image description here

    how to create root object? maya > hik > skeleton > hips transition, it will generate hip parent object, set this parent object as root object, set root object translate to (0,0,0) and adjust hip to make sure whole model world position is same like old

    enter image description here

    above video also provide way to adjust this root object