I have added a 2d Crosshair texture for my mouse aim and put it onto a empty game object and I have managed to get it to appear on screen however it is huge and doesn’t seem to follow my mouse movements.
Here is my script, any help would be greatly appreciated.
#pragma strict
var crosshairTexture : Texture2D;
var position : Rect;
static var OriginalOn = true;
function Start () {
}
function Update () {
position = Rect((Screen.width - crosshairTexture.width) / 2, (Screen.height - crosshairTexture.height) /2, crosshairTexture.width, crosshairTexture.height);
}
function OnGUI() { if(OriginalOn == true) { GUI.DrawTexture(position, crosshairTexture); } }