The problem:
I have a character model with a Nav Mesh Agent
component. It moves perfectly well to any destination I tell it to move (using the NavMeshAgent.destination
property).
But this suddenly fails as soon as I use an animation controller I downloaded from the store. The character won't run to it's destination; instead, it will endlessly run around it in circles.
I'm not sure why this happens, but I suppose the running animation somehow cripples the character's ability to turn. The Inspector, in the import setting of the relevant .fbx file shows: Average Angular Y Speed: 0.0 deg/s
.
What I really, really fail to understand is why this keeps happening even though I have explicitely set NavMeshAgent.updatePosition
and NavMeshAgent.updateRotation
properties to true
. The way I understand the documentation, this should make the character move as the Nav Mesh Agent
wants it to move, and not as anything else (animations included) wants it to move?
How should I fix this problem? How should I force the animation not to meddle in the movement?
Apply Root motion
worked like a charm. But, if I may ask, why didNavMeshAgent.updatePosition
andNavMeshAgent.updateRotation
have no effect? – Gravitate