Search Unity

Animator + Root Movement + NavMesh Agent + Behaviour Designer

Discussion in 'Animation' started by Tom163, Sep 21, 2018.

  1. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    I'm trying to get the above combination working, and everything I find on the Internet seems outdated and possibly misleading.

    So my behaviour tree (in Behaviour Designer, though probably any other AI solution would be similar) determines where my NPC is moving towards. This gets fed to the NavMesh Agent. Works well.

    However, I want to synchronize this with the Mecanim animation. So I have an Animator Control. I read somewhere that the best way to do it is to use the root movement (RM) animations, which my models have. From what I understand this will ensure that I don't have any feets sliding around.

    How do I set up my NavMesh Agent and my Animation Controller so that it takes the forward movement from the animation clips? The turning movement I can take from clips in some cases, but many models don't have turning clips, only walk and run.

    If there is a not-outdated tutorial or HOWTO somewhere, pointers would be brilliant.