Hello Jean, and sorry for the very late answer.
By the index, I meant the link we're sent to when we click the question mark under an action, like here
https://hutonggames.fogbugz.com/default.asp?ixWiki=1&pg=pgSearchWiki&qWiki=title:Nav%20Mesh%20Agent%20Animator%20Synchronizer.
I have new questions about the mecanim/navmesh combination, but first, I'll share what I found in case other users need infos.
To get the rotation of a navmeshagent, you can get the localRotation.y from its transform in a float with the "getproperty" action. Then do it again in an other float after a certain amount of time (using a "wait" action and an other state) and substract these two floats. You now have a "rotation over time" float that you can use to tell to the animator (with the "set animator float" action) what is the rotation speed .
Do the same for the velocity (again with the "getproperty" action) and you can now set moving and turning animations according to your navmeshagent.
The thing is, with this technique, you have the navmesh that sets up the movement, and the animator comes after (without root motion).
What I'd like, would be to be able to do the opposite = having the navmesh agent to set up a destination, then having the animator to "choose" the animation with root motion to move the animator.
In the unity documentation, here is what is written :
Agent follows animation :
- Disable NavMeshAgent.updatePosition and NavMeshAgent.updateRotation to detach the simulation from the game objects locations
- Use the difference between the simulated agent’s position (NavMeshAgent.nextPosition) and animation root (Animator.rootPosition) to calculate controls for the animations
- See Coupling Animationfile:///E:/Program%20Files/Unity/Editor/Data/Documentation/en/Manual/nav-CouplingAnimationAndNavigation.html and Navigation for more details.
I'd like to know if you know a way to do it?