1 de mai de 2017

GameObject following Mouse

Vector3 temp = Input.mousePosition;
temp.z = 10;
transform.position = new Vector3(Camera.main.ScreenToWorldPoint(temp).x, transform.position.y, transform.position.z);

Nenhum comentário: