Camera.main.ScreenToWorldPoint return camera position

Iam trying to get world co-ordinate from my screen touch position, all i have is a cube in my scene and i am attaching a script to it which will return world co-ordinate, here is the update function from script.

function Update () {
for (var touch:Touch in Input.touches) 
	{
	Debug.Log(touch.position +" "+Camera.main.ScreenToWorldPoint(Vector3(touch.position.x,touch.position.y,0f)));
	}
}

and here is the kind of output iam getting

(135.9, 235.5) (0.0, 18.0, 0.0)
UnityEngine.Debug:Log(Object)
TestIos:Update() (at Assets/Scripts/TestIos.js:26)
(154.1, 226.7) (0.0, 18.0, 0.0)
UnityEngine.Debug:Log(Object)
TestIos:Update() (at Assets/Scripts/TestIos.js:26)
(162.6, 223.1) (0.0, 18.0, 0.0)
UnityEngine.Debug:Log(Object)
TestIos:Update() (at Assets/Scripts/TestIos.js:26)

what is the issue or what i am doing wrong, ScreenToWorldPoint return (0,18,0) which is my main camera co-ordinate, please help me with this issue.

Here’s a question that discusses the same issue as yours: Camera Screen to world point returns cameras transform position

So basically the reason is that since you are providing 0 for the z there is no depth present.

So if you want to know the world position you have to provide z value for the depth at which you want the point from the world co-ordinate otherwise use raycasting.

Find the Y(up axis value) value of the camera and the plane in the world. Find the difference between them and use that as Z value in Camera.main.ScreenToWorldPoint(Vector3(touch.position.x,touch.position.y,Z)));