Thanks for the detailed explanation... currently, the game simply sets an empty gameobject to the position of the cursor, then Transform.LookAt()s it. With a direction variable as a vector2 would you just calculate the slope and convert it into degrees? I've never had to point anything towards a mouse before.
Viewing post in Extreme Blast jam comments
Vector3 cursorPosition = camera.ScreenToWorldPoint(Input.mousePosition);
Vector2 direction = (cursorPosition - transform.position).normalized;
transform.right = direction;
This would rotate the player to face in the direction of the mouse.
No need for anything else.
This is how I rotate the gun in our game.