camera.ScreenpointToRay(Input.GetTouch(0).position problem with unity remote?


i have a problem with screenpointoray position. when i test it on unity remote and i press on the screen i get some wierd coordinates… here’s the code

		if (Input.touchCount > 0) {

				Ray ray = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
				RaycastHit hit;
				print (Camera.main.ScreenPointToRay(Input.GetTouch(0).position));
				if (Physics.Raycast(ray, out hit, 10000.0f)){
					if ( == "drum1"){
						print ("drum1hit!");

so if i press on the screen the print function of the coordinates give a value like -14, 1.2, -6.0.
this is not even in my camera view… it has to be something like -3, 1.2, ect.
the camera is orthographic btw, i’m not sure that would make a difference…

can somebody please help me ?


Its the world position of the gameobject that got hit by the ray(the value that you see in the Unity inspector).