Hello,
I would like for a guiTexture to display when the camera gets within a certain distance of my book. I can get the guiTexture to display when I click a button, but I want it to display when I face my book.
function Update()
{
var hit : RaycastHit;
if(Physics.Raycast (transform.position, transform.forward, hit, 3))
{
if(hit.collider.gameObject.tag == "book")
{
guiTexture.enabled = true;
//hit.collider.guiTexture.enabled = true;
//print("Casting Ray");
}
}
}
Appreciate any help.