2D Character, left animation is not being accessed

2019-08-19 10:22发布

I have issue in Unity with my 2D characters animation. I simply made the animation of it walking right and left. I set things up in the animator, and for some reason the right animation is being accessed, but not the left whenever I press "A". This is the code part of animation of my PlayerController script:

anim.SetFloat("mSpeed", Mathf.Abs(rb.velocity.x));

Animator Setup

1条回答
我命由我不由天
2楼-- · 2019-08-19 10:29

Figured out what to do instead of using left animation, I just used the Sprite Render to Flip.X when the "A" key is pressed. And it works!

查看更多
登录 后发表回答