Hi All,
I have a PNG gunsight made in photoshop that I would like to place in front of the camera so that as the camera turns, the gunsight moves with it. Do I create a GUI texture and make it a child of the camera? Thanks for the help.
Hi All,
I have a PNG gunsight made in photoshop that I would like to place in front of the camera so that as the camera turns, the gunsight moves with it. Do I create a GUI texture and make it a child of the camera? Thanks for the help.
You shouldn’t parent a GUITexture to a camera (or any moving object), since its position in world space determines where it will appear in the view. If the world XY coordinates are much out of the 0…1 range then the texture will not be visible. Add the gunsight texture to the scene and set the XY coordinates somewhere around 0.5 to get the sight near the centre of the screen. You can use the pixel offset to compensate for the width of the sight texture.