I cannot make this ray to follow my mouse cursor.
It's always inverse on X axis.
I think that the problem is with my atan function, but since my trigonometry is fairly low, I have no idea how to fix this one.
This is how I calculate radians:
var dx = target.x - center.x;
var dy = target.y - center.y;
var rad = Math.atan2(dx, dy);