Last active
April 26, 2020 21:19
-
-
Save burrussmp/8962d1c114b268f0fde31a48602bef4a to your computer and use it in GitHub Desktop.
Vuforia handle detection of image target
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void OnTrackableStateChanged( | |
TrackableBehaviour.Status previousStatus, | |
TrackableBehaviour.Status newStatus) | |
{ | |
if (newStatus == TrackableBehaviour.Status.DETECTED || | |
newStatus == TrackableBehaviour.Status.TRACKED || | |
newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) | |
{ | |
Debug.Log("Detected"); | |
StartCoroutine(GetData()); | |
Debug.Log("Got Data"); | |
StartCoroutine(CreateMesh()); | |
Debug.Log("Got Mesh"); | |
StartCoroutine(UpdatePos()); | |
Debug.Log("Updated Position"); | |
detected = true; | |
} else { | |
detected = false; | |
foreach (Transform child in gameObject.transform) { | |
GameObject.Destroy(child.gameObject); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment