hello folks,
just a quick question that i have not found the answer to on my searches.
but i have my game running on unity remote [wihch is damn helpful] and have my character. BUT it jumps to every position without dragging.
i want to fix it so the character only moves when my finger is on the character itself rather than jumping around.
i have the code done for movement, which is working completely fine
if(Input.touchCount == 1){
Touchtouch = Input.GetTouch (0);
float x = -12.92f + 26 * touch.position.x / Screen.width;
float y = -9.46f + 19 * touch.position.y / Screen.height;
transform.position = newVector3(x, y, 0);
}
ill keep searching to see if i can find something
thanks
Essentially what you have to do is decide where the finger touch is in world coordinates, and compare to see if it is close enough to the character to count as “on the character.”
There are transform helpers in the Camera class (such as Camera.ScreenToWorldPoint()) or you can use the similar method of converting a screen touch into a Ray going into the scene and seeing where it intersects the plane where your character is.
Obviously, once you decide if it is close enough, then you can know whether to do whatever jumping/not-jumping you want to do.
sorry for late response did not see i had a response 
thanks for that, ill have a look-see
thanks
boom. got it. it seems a bit ‘meh’, but i think that from the unity remote. so its a bit slow and cuts out, but does work if not going nuts 