So i have a gameobject with a sprite and a collisions attached to it.
This is the script attached to it:
private Vector3 move;
void OnMouseDrag()
{
move.x = Input.mousePosition.x;
move.y = Input.mousePosition.y;
move.z = -1;
print ("hit");
_co.transform.position = move;
}
Whenever i click and drag the object it dissapears.
Ive tried it with several z values but i cant seem to figure out why.