I’m using a NavMeshAgent to move my character forward and I’m using
agent.speed = (animator.deltaPosition / Time.deltaTime).magnitude;
to set the speed.
It works reasonable well for walks that don’t have a lot of side to side movement, but some of my animations do have a lot of left and right movement of the walk so I want to fix it in code.
Since the agent is handling the forward movement, how can I move the transform.positon of the character only left or right, without moving it forward, based on the animator.deltaPosition?