GUI Texture Spinner - Dead Center

I’m using a 32x32 texture2d that’s basically a refresh circle, with the circle being dead center at 16,16 on the graphic. However, when I try spinning it with the below snippet, the pivot point is off, and the circle doesn’t spin locally, but “precesses”… I’m wondering if this is because the pivot center keeps changing - or if this is somehow not dead center?


var spinner:Texture2D;
var rotAngle:int;
var pivotPoint:Vector2;

function Start(){pivotPoint = Vector2(Screen.width/2,Screen.height/2);}

function OnGUI () {
GUIUtility.RotateAroundPivot (rotAngle, pivotPoint);
GUI.Label(Rect(Screen.width/2-16, Screen.height/2-16,32, 32),spinner);
rotAngle += 1;


Apparently it’s an issue with the default having non-zero padding and margin. Assigning a zero-ed out fixed it!