Instantiate Position / Camera problem

Hell guys!

I have a problem with my instantiate. I just want to create an object, which will be spawned EVERYTIME in the “right bottom corner” of the camera, REGARDLESS if i looking upwards, downwards or other things. (like a standard first person equip object).

var instanceObject : GameObject = Instantiate(gameObject, mainCamera.GetComponent.<Camera>().transform.position + transform.forward * 0.1, mainCamera.GetComponent.<Camera>().transform.rotation));

  instanceObject.transform.parent = mainCamera.GetComponent.<Camera>().transform;
  instanceObject.transform.localPosition.y -= 0.1;
  instanceObject.transform.localPosition.x += 0.2;

This solution instantiate a object, which is nearly perfect. It will be spawned with the right position and so on. But if I look upwards or downwards, the rotation (and position) of the object is not correct and I cant figure out, why. (looks like the rotation is inverse, but I got no solution).

Someone got a hint?

Could try this to get world position of viewport bottom corner:

Or is that more like UI element/object that should stay in the bottom corner?

Ok i got it. LocalPosition of the prefab was not 0 as default, so it got positioned randomly.