This is a bit a more complicated situation.
First of all.
In the center of the screen is a perfect circle, this circle is divided into pieces like a pie. Whenever the mouse moves, I want the direction vector2 value returned.
For example
When I place the mouse on screen position {0,10}, assuming that the center position of the screen is {10,10}, my script will return the value "180".
Or if you place the mouse at position {10,0} then the script will return "90".
Or at {5,5}, the script returns "135".
The returned rotation value will then be used to determine on what piece of the pie chart that the mouse is touching. This way, I can have gui collision in a shape of an arc of a circle.
Now what I essentially want is this
function((X,Y) position of Mouse)
return direction value of the vector from 0-360 from the center of the screen.
If this question is too confusing feel free to ask.

1 comment
What's your attempt at this?