Hello Everyone!
I am trying to make my AI strafe using navmesh for movement and mecanim to play the animations.
I want to ai to always be aiming towards my player so I turned of UpdateRotation on the navmesh and created a function that makes it always face the player.
I have made a blend tree in mecanim using free-form Cartesian blend between two floats, velocityX and velocityZ. velocityX controls the forward and backward walking animations, velocityZ controls the strafe left and right animations.
I want him to move along the path and play the correct strafing animations while facing the player like below.

How would I go about getting the proper float values for velocityX and velocityZ so I can set them?
Or if anyone uses a different solution can you please help me?