Hello,
I would like to change the texture depending on the image i track.
I found this :
// chose the texture based on the target name
int textureIndex;
if (strcmp(trackable->getName(), "chips") == 0)
{
texureIndex = 0;
}
else if (strcmp(trackable->getName(), "stones") == 0)
{
textureIndex = 1;
}
else
{
textureIndex = 2;
}
in ImageTargets.cpp (line 342 to 355).
I would like to know where the name of the trackable is set (because i always get into the 'else' (i.e. textureIndex = 2) ), and if it is possible to change it (so I could make a different texture depending on what image is tracked).
Thanks in advance.
The name of your trackable is set inside the .xml file. Look for an atribute called "name" then you find the name.