Instantiate Prefab

worldPos = Camera.main.ScreenToWorldPoint(touch.position);


What did I do wrong? When i touch the screen the Prefab only appears in the middle of the screen.

Touch.position is a Vector2. The implicit conversion from Vector2 to Vector3 ( see here), since ScreenToWorldPoint expects a Vector3 as a parameter, leads to the following statement:

worldPos = Camera.main.ScreenToWorldPoint(touch.position.x, touch.position.y,0);

you set the near clipping plane distance to zero. This basically means you projected the scene into one single point. Use something like this instead:

worldPos = Camera.main.ScreenToWorldPoint(touch.position.x, touch.position.y,Camera.main.nearClipPlane);