i finally solved this. There was a code sample on a yahoo answers page that i started with, and after i corrected the three glaring errors in it, i rotated the axis and fixed it to make a 0-359 degrees with vertical top being 0.
C# Code:
Vector2 diff = new Vector2(mx, my); Rotation = Math.Asin(1 * diff.Y / diff.Length()); Rotation = Math.PI / 2 + Rotation; if (diff.X < 0.0) { Rotation = MathHelper.ToRadians(360) - Rotation;// Rotation * -1; }




Reply With Quote