I have a player which moves left, right and can jump. It moves based on where the user clicks, e.g. if the user clicks left, the player moves left. I have set a custom sprite to follow the mouse cursor. However, I want the cursor to rotate based on where it is relative to the player, for example when the cursor is to the left of the player it points left, and rotates as the cursor moves up or down. I also want the pivot point of the sprite to be the mouse cursor. So even though it rotates relative to it's distance and angle to the player sprite, the pivot point that it rotates around should be the mouse cursor.
Maths isn't exactly my strong point, so I was wondering if I could get some help? =)
Many thanks!