My charcater has left, up, down, up left and down left animation clips which i have used in blend tree. I also want my character to move in right, up right and down right direction. But instead of running, it slides in right direction.
My character is a 2d sprite, so i cant use blend tree mirror animation. I tried using Sprite renderer's flip X. Used the script for flipping but it not working for me.
The sr.flipX script was working when i was only moving it in X and Y direction. But now i have added other directions, its not working.
And when I used this for flipping. The sprite is flipped only. But i also want the animation clip to be mirrored in other direction.
if (moveHorizontal != 0 || moveVertical != 0)
{
float direction = Mathf.Sign(moveHorizontal);
transform.localScale = new Vector2(direction, 1f);
}
Maybe flip is not the right word, I want my animations from left direction to be flipped in right direction when i move my character to right side