Hi, I was trying out the ImageTargets sample and I was able to get the name of the trackable when it is tapped through the help of some guy's code from another thread here in the forum. But I am just wondering on how will I be able to distinguish one image from another when multiple images are simultaneously rendered into the camera frame? So far I was only able to get to know the name of only one image which is the most recent that has been overlaid.
These are the codes that I used to get the name of the active trackable:
QCAR::State state = QCAR::Renderer::getInstance().begin();
const char * name="";
for(int tIdx = 0; tIdx
{
//get target object
const QCAR::Trackable* trackable = state.getActiveTrackable(tIdx);
name = trackable->getName();
}
return env->NewStringUTF(name);
To get currently tracked Trackables in Unity:
To get all Trackables (tracked or not), use GetTrackableBehaviours() instead.
See the API docs for more info:
http://developer.vuforia.com/library/resources/api/unity/class_vuforia_1_1_state_manager