- Home /
Rotating sprite towards another sprite
I know, that this question was asked before, i've checked answers already, but none of them didn't helped me. So, i need to rotate my sprite towards some another sprite. I've tried a lot of different things, including 1) getting LookRotation and setting it's euler z param to x value; 2) calculating angle between up of object and target transforms, and rotating objects for that angle; 3) common LookRotation while setting second parameter to Vector3.forward. Some things works in some way, but still not like they should.
So, i seek some help. Unless unity developers will add some functionality for that.
Never$$anonymous$$d, found some weird, but working solution.
Answer by lentinant · Feb 19, 2014 at 09:17 PM
Nevermind, found some weird, but working solution. http://answers.unity3d.com/questions/630670/rotate-2d-sprite-towards-moving-direction.html This one. Although, i had to change moveDirection.y to -moveDirection.y.
Your answer
![](https://koobas.hobune.stream/wayback/20220613134052im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Child Sprite Skewing 1 Answer
Rotate & Translate 1 Answer
Play movement and restrictions - Similar to a window wiper 2 Answers
Rotate object via script like in editor 1 Answer
Lerp Rotation broken 1 Answer