- Home /
rotate according to mouse point
hi friends
can any one say how to rotate texture2d according to mouse angle.I need to rotate my texture according to mouse angle
Answer by Graham-Dunnett · May 13, 2013 at 10:17 AM
Put the texture onto a plane, and then rotate the plane.
Note that my mouse does not have an angle associated with it, I just have a boring mouse that moves a pointer about the screen. I guess I could draw an imaginary line from the mouse pointer to the centre of the screen, and then use the angle that lines makes with the horizontal axis of the screen to make an angle. If I had such a thing, then I'd just use `Transform.Rotate()`.
Your answer
![](https://koobas.hobune.stream/wayback/20220613102128im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Player looking/aiming at mouse 1 Answer
third person controller like in Assasian's creed or GTA5 0 Answers
[SOLVED]2D lookAt is off, any ideas? 1 Answer
Child object won't follow the player. 1 Answer
Mouse Look At 0 Answers