Hi, is there any way I can put a GUITexture behind a 3d object.
Basically I am using 3d boxes as mouse trigger points but they need to sit on top of a 2d Guitexture for them to be clickable.
Cheers
Hi, is there any way I can put a GUITexture behind a 3d object.
Basically I am using 3d boxes as mouse trigger points but they need to sit on top of a 2d Guitexture for them to be clickable.
Cheers
gui is always on top of the camera.
so what you need to do is use 2 cameras.
One for the background UI and one for the 3d world and foreground ui
Cool. Now they are drawn on top of the guiTexture but when I click them with the mouse they dont detect it and instead the background gui texture detects a mouse hit. Any idea why this would be?
It looks like the OnMouseUp is working for both cameras (ie. twice) and so its the object that it finds last that is the clicked one…
Does anyone know how to get around this?
With this code the message sent is always
ClickedOutsideCollider regardless of whether you click on a collider…
function OnMouseUp()
{
//if clicked on collider
if (isBackgroundImage!=true)
{
PicturePopperScript.SendMessage("ClickedCollider");
}
else
{
PicturePopperScript.SendMessage("ClickedOutsideCollider");
}
}
?? :?