Touch point to world coordinate and local coordinate

How do you convert a touch point to world coordinate and local coordinate?

Beware that 2D touch point when transformed to 3D scene becomes a ray rather than single point. This ray hits everything painted on the touched screen point. You will have to do a raycast to see what exactly was hit and where

Touch position can be translated to ray as follows:

Ray ray = Camera.main.ScreenPointToRay( Input.touches[0].position );

This ray is in world space and if you want to know what it hits (i.e. what is touched on screen with finger), do a raycast. If something was hit, exact hit position in world space will be stored in hitInfo:

RaycastHit hitInfo;
if (Physics.Raycast( ray, out hitInfo ))
{
    Vector3 worldSpaceHitPoint = hitInfo.point;
}

If you want to know local position of hit on object which was hit by raycast, you will simply transform worldSpaceHitPoint into object’s local space. The hit object is also stored in hitInfo:

Vector3 localSpaceHitPoint =
hitInfo.transform.worldToLocalMatrix.MultiplyPoint( worldSpaceHitPoint );