When setting the image position to the mouse position the image falls behind but does reach the location of the mouse. Not sure what is going on. Can anyone explain.
using UnityEngine;
public class Position: MonoBehaviour {
public GameObject image;
void Update () {
if(Input.GetMouseButton(0))
{
image.transform.position = Input.mousePosition;
}
}
}