ATan2( y, x ) gives the angle for a vector from 0,0 to x,y.
The assumption is that the X axis is 0° and Y is 90°.
Compared to this you have X,Y swapped: X axis is 90° and Y is 0°.
And you are going the opposite way, from x,y to 0,0.
So you want ATan2( -x, -y ). Or something. Just tinker with it until you get the effect you want.
The assumption is that the X axis is 0° and Y is 90°.
Compared to this you have X,Y swapped: X axis is 90° and Y is 0°.
And you are going the opposite way, from x,y to 0,0.
So you want ATan2( -x, -y ). Or something. Just tinker with it until you get the effect you want.