Question by
Mrsoldier3201 · Sep 03, 2016 at 07:46 PM ·
2dplatformerrotation axis
Get Object to rotate around an ellipse depending on cursor position?
I'm making a 2D platformer, and I can't figure out how to rotate an object around the player depending on where the cursor is. I want the object being rotated to look at the cursor, and the object to go around the player. Here is kinda what I mean
I'm using C#, thanks!
untitled-2.png
(23.3 kB)
Comment
Answer by ArturoSR · Sep 03, 2016 at 09:29 PM
Hello there.
OK, you need to work around look at, you can get the mouse/touch (if it is for mobil) screen position and convert it to world position, this way you can tell to object where to look, check the documentation about it, cheers.
Your answer
![](https://koobas.hobune.stream/wayback/20220612092122im_/https://answers.unity.com/themes/thub/images/avi.jpg)