Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Pairing Navmesh with Animations

Discussion in 'Navigation' started by Jsbbvk, Jun 17, 2018.

  1. Jsbbvk

    Jsbbvk

    Joined:
    Oct 22, 2017
    Posts:
    1
    In my project, I am using the ThirdPersonController that I imported from Unity's Standard Assets. I also have the ThirdPersonAnimatorController for the Ethan Figure. I set up a NavMesh in my scene and created an Ethan GameObject with the Animator and NavMeshAgent. So far, the NavMeshAgent works fine but I want the movement to be synchronized with the animations.

    I don't know much about blend trees but I do know that you can set parameters in the script to control the animations. In this case, the ThirdPersonAnimatorController has two parameters, turn and forward (both are floats from 0 to 1 representing the angle of turn and movement speed). So the blend tree is a 2D Freeform Cartesian.

    The only problem I have is getting the values from the NavMeshAgent (such as the turn speed and movement speed) so I can pass it into the blend tree.
     
  2. havchr

    havchr

    Joined:
    Jun 18, 2009
    Posts:
    75
  3. IsouEU

    IsouEU

    Joined:
    Aug 4, 2018
    Posts:
    12