Hello. can you help me with this script.
look my problem in this video http://www.youtube.com/watch?v=Hl6qLOmia2Q
i have this code attach to the GUItexture button. and at the end another script attach to th 3d Teapot. both are java script. when im out the tracker image, the 3d teapot still appear when toching the button. I need that the GUItexture button work only when appear the tracker image.
var enabledState:boolean=true;
var vuforiaVisible:boolean=false;
var myObject : GameObject;
var yourScriptInstance : MyScriptName;
function Start(){
myObject = GameObject.Find("teapot");
yourScriptInstance=myObject.GetComponent(MyScriptName);
//MyScriptName is your script with var enabledState:bool=true;var vuforiaVisible:bool=false;
} function Update () {
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began){
if (guiTexture.HitTest(Input.GetTouch(0).position)){
if(MyScriptName.vuforiaVisible);
{
myObject.renderer.enabled=myScript.enabledState!=m yScript.enabledState
}
}
}
}
the script attach to the 3d teapot object
#pragma strict
function Start () {
}
var enabledState:boolean=true;var vuforiaVisible:boolean=false;
function Update () {
}
debbug vufoia code button
Hi, please avoid posting the same question multiple times;
you posted already in here:
https://ar.qualcomm.at/content/debbug-vuforia-code
Please follow up with the link above