Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How to properly flip 2D character with new Unity4.3 2D framework? (Have problem with animation rotation)

$
0
0
Hello there, i'm already checked official Unity 4.3 example project, and there they use Vector3 theScale = transform.localScale; theScale.x *= -1; transform.localScale = theScale; This works pretty well, but. But i'm encountered an trouble, not sure this trouble with this Flip or with something else. I'm use Animator to animate my characters, i have `Attack` animation, which in addition to the sprite animation also move character's `Hand`, which can carry the weapon. Problem is when i flip the character to opposite direction hand will move at characters back, which is wrong. (video below will be more descriptive) I discovered that this problem occure only if i modify the `Hand`'s rotation in animation, so if i works only with `.position` this works well, but i need the rotation! What is best way to get this work? Here the youtube video: http://youtu.be/qpMK2gRgDz8

Viewing all articles
Browse latest Browse all 171066


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>