2D Character, left animation is not being accessed

安稳与你 提交于 2019-12-12 04:39:11

问题


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:


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!



来源:https://stackoverflow.com/questions/46268750/2d-character-left-animation-is-not-being-accessed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!