Hello, ive got a really weird problem, im trying to move button inside gui but for some awkward reason the Y movement is reverse. Ive try to * it by -1 and it just disapear. For the X value it work fine... Am I missing something here that i dont understand.
//This is a test to move around some button
var skullbutton : Texture2D;
var mousex = 0;
var mousey = 0;
function Update () {
if(Input.GetMouseButton (0))
{
mousex = Input.mousePosition.x;
mousey = Input.mousePosition.y;
}
}
function OnGUI () {
GUI.Button (Rect(mousex,mousey,50,50), skullbutton);
}
Ive check my setting for my mouse Y cursour that could be set to inverse, but its fine... anyone would know why it doesnt work? Or is there another way to have my button move around with my mouse when i click on it?