Question by
MotaZX · Nov 04, 2018 at 02:13 PM ·
2d-platformerrotate object2d-gameplayrotatearoundrotatearoundpivot
How do I rotate an object around around another, following mouse position and facing it?
So, I'm trying to develop a small platformer in which the player has a sword that he controls with his mouse. The ideia is to make it move around the player in a circle like movement and face the mouse. (Working like an aim)
Here is an image to represent my idea:
But I'm having so much trouble, I tried more than 15 different codes that I made, tried copying some from the internet and everything. Can anyone help me plz? Obs. I can make the sword either a separate object or a child from the player, which one should I use?
help.jpg
(8.8 kB)
Comment