How to get position of touch on touch screen

Hi, kind of new to unity android. Anyway i was wondering how i could get the position of a touch on the screen without it being in pixels cordinates. Here is the code I was trying.

if(Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)

{

    fingerPos =  Input.GetTouch(0).position;
		
	transform.position = fingerPos;

}

I had this attatched to a cube, and of course it flew off screen.
Thanks for any help in advance!

Since you are dealing with a perspective camera, the world coordinates will depend on the distance from the camera into the scene. So figure out the distance you want to use, then use Camera.ScreenToWorldPoint() to convert the value. For example, say you wanted it 8 units in front of the camera:

var pos : Vector3 = fingerPos;
pos.z = 8;
var realWorldPos = Camera.main.ScreenToWorldPoint(pos);

I add this because you said C#:

Vector3 pos = fingerPos;
pos.z = 8;
Vector3 realWorldPos = Camera.main.ScreenToWorldPoint(pos);