Searching for hours, the most relevant post with my issue was this (http://answers.unity3d.com/questions/1116799/2d-top-down-4-directional-rpg-enemy-animation-foll.html) and it is unanswered.
I am trying to get the animations to play correctly on an enemy but I can't find the right code to change the animator parameters on my blend tree.
For the player controlled character I used the "Input.GetAxis" and then "SetFloat" etc to set them. What's the code to get the float x,y values of the movement of my object and set them to my float parameters? :( (Also tried making a Vector2 with the object's Rigidbody2D velocity and then using it to set them but no luck there).
Thanks in advance.
↧