player following touch position

omg how hard can it be to make a player object follow your finger’s touch input?
spent the past 5 hours googling it and looking on here Answers but others ask and still no one gives a solid solution…

I have a scene setup, camera is following the player object from a standard third-person view, tilted down towards the floor/player at a certain degree, following the player.
I want to now move the player to anywhere I touch on the screen, move to wherever in the level and follow my finger if I continuously drag around the scene… There is a ground plane. So the touch input coordinates I’m guessing will be a 2d coordinate (point on a screen), but the player object has to move left, right, forwards, backwards in 3d, most likely in the z-axis.

Refer to my previous question posted, with my existing code that does not work… Moving player to mouse click, falling through scene - Unity Answers
The answer attempt provided didn’t work, debug log was spitting out errors because I was trying to convert the answer attempt from C# to JS but I guess I did it all wrong too.

I read up everything from the Ray. api and how it draws a ray from wherever you touch on the screen to the scene but I’m not a programmer so I might have an idea how to get it to work but I’m struggling with actually getting the code to work.

I thought this was pretty common and a standard input method for controlling a player in a game… why is it so hard to find a solid answer anywhere?
Please someone help a.s.a.p… so hard to move on with the project without having even the basic core element of the game figured out…

This issue is “hard” because different setups and different mechanics require different code. IMHO, the best solution to this specific problem is to use Unity’s mathematical Plane class, and use the Plane.Raycast(). You can raycast against the ground plane (and you should if it is not flat), but the results will be off a bit because the the geometry. Here is a sample script using the mouse. I leave converting it to touch to you:

#pragma strict

var speed = 4.0;

function Update() {
    var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    var plane = new Plane(Vector3.up, transform.position);
    var dist : float;
    if (plane.Raycast(ray, dist)) {
        transform.position = Vector3.MoveTowards(transform.position, ray.GetPoint(dist), speed * Time.deltaTime);
    }
}