Hi there!
I have a question about how to make 8thWall detect multiple imageTargets at once. I can load multiple ImageTargets with:
xrcontroller.prototype.setImageTarget = function(_loadImageTargetSet) {
// if worldtracking enabled, 8thwall provides 5 image targets to be tracked.
XR8.XrController.configure({imageTargets: _loadImageTargetSet})
}
The _loadImageTargetSet contains an array of differend imageTarget names i added onto the 8thWall Dashboard.
But what i dont get is that i only can check for one imageTarget at the same time with the predefined Script i got from the Template (i modified it a bit to pass a name dynamically from another script):
var namedimagetarget = pc.createScript('namedimagetarget');
namedimagetarget.attributes.add('name', {type: 'string'})
namedimagetarget.prototype.trackImageTarget =
function(targetImageID) {
this.name = targetImageID;
XRExtras.PlayCanvas.trackImageTargetWithName(this);
};
But how can i setup tracking of multiple imageTargets at the same time? I mean im loading several imageTargets within the XrController.configure but only can check for one image? If im calling this function it overwrites the previous string / name to track the coresponding imageTarget. Because one scene can have multiple different imageTargets all the loaded image targets should be tracked / 8thwall should recognize which one is currently tracked. Passing a name array like this.name = [name1, name2]; also doesnt workβ¦
I took a look into the XRExtras.PlayCanvas script and it contains only the function βtrackImageTargetWithName()β.
I would really need help on this one - Thx!