It is posible to acces to the part of a multitarget to know its state, if is tracked or not?
Is an option only for the native Sdk?
It would be very usefull in unity too.
There is not an explicit API for this in Multi Target in Unity (e.g. there is no getSubPart() or similar method);
however, due to the hierarchical parent-child structure of game objects in Unity, the subparts of a Multi-Target can be obtained as children of the parent MultiTarget object, using the transform.GetChild() Unity API
or more in general;
Once you have retrieved the children (sub-parts image targets) of the Multi-Target, for each of them you could obtain its TrackableBehaviour component using
TrackableBehaviour childTrackableBehaviour = subpart.GetComponentInChildren<TrackableBehaviour>();
then you can query the Status using the Vuforia Trackable.Status property:
I hope this helps.
Sorry I have tried this, but i cant find the TrackableBehaviour of the subparts, I cant see them in the Editor either ,
Am I doing something wrong, or maybe this feature is not enable in the last version?
Is there another way to know which parts are tracked in a multitarget?
Thank you, bye
Hi, you are right (apologies if my previous message was partially incorrect);
you can in fact retrieve the children of the MultiTargets (the parts are attached under the game object called "ChildTargets"), however the individual parts in Unity do not have the TrackableBehaviour component attached, so you cannot query the status for the individual subparts. This is a limitation of the Unity implementation.
As a possible workaround, I could imagine using a mathematical approach; since the relative position and orientation of the subparts are known (and you can also get them at runtime from the Transform of the ChildTargets children), you can see if a target is visible and facing the camera in the current frame; this would allow you to guess if that part is tracked or not.
Are you sure you want to delete this message?
Are you sure you want to delete this conversation?