How do I get ipad coordinate to match the ones in the editor?

I place an object in the unity iphone editor at (0,0,0). And I have a script that gives me the coordinates of a touch. When a run the app on the ipad a touch the place of my (0,0,0)-object then a get a debug message with a different coordinates then the (0,0,0).

How do I get the touch-coordinates to match the ones I set in the editor.

Hopes my questions makes sense and thank you for helping :)

(i'm working with an orthographic camera) I guess I'm asking for a way to control the relatioin between the cameras position a the screen space.

I think the problem is you're getting the position of the collision itself (where the ray hits the collider). It sounds like what you want is the transform co-ords of the object you have hit.

So rather than hit.point, you'll want to find out what you hit, then get its transform. hit.collider.transform.position :)

var ray = Camera.main.ScreenPointToRay (Input.mousePosition); var hit : RaycastHit;

if (Physics.Raycast (ray, hit, 200)) 
{
    var objecthit:Transform = hit.transform as Transform;
        print ("Object is positioned at :"+hit.collider.transform.position);
}