- Home /
This question was
closed Aug 01, 2014 at 02:57 AM by
robertbu for the following reason:
Duplicate Question
Question by
picstruck · Aug 01, 2014 at 02:55 AM ·
rotationrotate objectmouseposition
Rotate object based on mouse position
I would like to rotate an object based on the position of the mouse. I have searched a lot for this but none of the solutions seem to work. This video is about GameSalad but it shows exactly what I mean. https://www.youtube.com/watch?v=EoyNhvqujuU
Comment
Best Answer
Answer by robertbu · Aug 01, 2014 at 02:57 AM
Here is a solution I know works (assuming your object is a Sprite or a Quad). It assumes that the front of the object is to the right when the rotation is (0,0,0). If you have trouble using it, make a comment, and I'll follow up..
http://answers.unity3d.com/questions/603757/2d-mouse-aiming.html
I've spent around 4 hours searching how to do this and now it finally works. Thank you very very much.