I'm trying to create a glowing orb that follows a user's finger when pressed down. It works well, but the Y axis is flipped. I figure that the screen position for the ipod is flipped from what the screen position is returned. (Top left of screen is 0, 480 for Input.MousePosition and 0, 0 for GUI.Layout). How can I write this to reflect the difference in Y values?
function OnGUI()
{
if(Input.GetButton("Select"))
{
mousePos = new Vector3(Input.mousePosition.x, Input.mousePosition.y);
Debug.Log("" + Input.mousePosition);
GUI.Label (Rect(mousePos.x-64, mousePos.y-64, sizeOfImage.x, sizeOfImage.y), imageToDisplay);
}
}