I am trying to move the position of the camera to the position of a touch, how do I got about changing my Touch.position into a position for the camera?
There are a lot of different ways you could achieve this (including raycasting - though much slower). However one method would be to determine the touch offset from center and then move the camera based upon this offset (some scale might be necessary - depending on how you’ve setup your camera.
As an example:
Touch touch = Input.GetTouch(0);
Vector3 offset = Camera.main.ScreenToViewportPoint((Vector3)touch.position) - (Vector3.one / 2.0f);
//3:4 screen ratio = 0.75f on Y 16:9 would be 0.5625f etc
Vector3 scale = new Vector3(1.0f, 0.75f, 0.0f);
Camera.main.transform.Translate(offset * scale);
Now again this might take some work to get the camera to move and look at the point you want (i.e. tweaking the scale till the movement is right).
There are other ways like working out the plane the target it on and calculating the distance between the camera’s current lookat on that plane and move that offset.
In any case setting up a special camera rig where the camera is a child of a gameobject that is aligned to the view plane will help you simplify any translation. As you can just move this aligned gameObject and the camera will move along this plane regardless of it’s orientation.
If you are trying to point the camera at an object and zoom, you’ll need to use raycasting to first find the 3D position of the object touched. You could then use Transform.LookAt to have the camera look at the object. To make it a bit more user friendly, you’ll probably want to interpolate the movement so it’s smooth. I’d use iTween to do that.