I am a noob in vuforia. I want to know which image is being tracked from the list in the XML file and I guess, adding
MarkerBehaviour marker = (MarkerBehaviour) mTrackableBehaviour;
Debug.Log("Trackable " + marker.Marker.MarkerID + " found");
at the end of OnTrackingFound method ( in the DefaultTrackableEventHandler script) would give me the same. But this gives me this error,
InvalidCastException: Cannot cast from source type to destination type.
DefaultTrackableEventHandler.OnTrackingFound () (at Assets/Qualcomm Augmented Reality/Scripts/DefaultTrackableEventHandler.cs:91)
DefaultTrackableEventHandler.OnTrackableStateChanged (Status previousStatus, Status newStatus) (at Assets/Qualcomm Augmented Reality/Scripts/DefaultTrackableEventHandler.cs:58)
TrackableBehaviour.OnTrackerUpdate (Status newStatus) (at Assets/Qualcomm Augmented Reality/Scripts/TrackableBehaviour.cs:142)
StateManagerImpl.UpdateTrackablePoses (UnityEngine.Camera arCamera, .TrackableResultData trackableResultDataArray, Int32 originTrackableID, Int32 frameIndex) (at Assets/Qualcomm Augmented Reality/Scripts/Internal/StateManagerImpl.cs:497)
QCARManagerImpl.UpdateTrackers (FrameState frameState) (at Assets/Qualcomm Augmented Reality/Scripts/Internal/QCARManagerImpl.cs:485)
QCARManagerImpl.Update (ScreenOrientation counterRotation, CameraDeviceMode deviceMode, .VideoModeData& videoMode) (at Assets/Qualcomm Augmented Reality/Scripts/Internal/QCARManagerImpl.cs:291)
QCARBehaviour.Update () (at Assets/Qualcomm Augmented Reality/Scripts/QCARBehaviour.cs:441)
What I am trying to do is, I want to augment a certain object on detection of a certain image and so I need to know the ID of image being tracked. I also have no clue how to assign particular gameobject on detection of that particular image. I am able to do the same but not for the desired images, all my objects are being augmented on only one image. How can I solve this issue?
Any help would be much appreciated. Thanks in advance!