Log in or register to post comments

VuMarks Multiple Targets (multiple objects for data)

September 8, 2016 - 12:59am #1

Hi ,

I have been using VuMarks ad they work quite well with your support and forums . I have a query regarding multiple targets.

I can see that we can configure multiple targets tracking in unity quite easily with settings of VuPhoria behavior script . My situation is like this:

I show a gameobject (a 3D sphere ) instead of the sprite when a VuMark is displayed on screen. I placed it under VuMark and when I play the scene this sphere sticks to VuMark and moves along with it (same as Sprite).I get the vumak Id using script in VuMakrHandler script and pass it on to sphere using sphere.getComponent<textonmaker>(). Where taxtonmarker is my script which has the string variable which stores this value . This whole scene works well for single marker but my requirement is to use multiple markers and  show the VuMarkId on each sphere (i.e. VuMark) when It is detected simultaneously. I see that as this sphere I added under 'VuMark' is a single instance, Showing different VUmarks only adds the id of  the latest VuMark. i.e. all the spheres show the same VuMark Id which is detected the last. I understand that this is the single instance of sphere , that is why this happens.

Is there a way I can show it's own ID on every sphere object that is shown on specific vumark detection? It should be sticking to the Vumark as well . I suppose I need to write a script that will generate a new sphere and assign the specific ID of the VuMark   to it, but then how will I stick (move along with VuMark) to it?   

VuMarks Multiple Targets (multiple objects for data)

April 1, 2017 - 6:48pm #5

lightshapeAR wrote:

Hello,

 

where did you find this VuMarkHandler script? I can't see it in the vuforia unity extension in my projects and also have no access to it in the scripts.

The only result in google is your post and

https://library.vuforia.com/articles/Solution/Working-with-VuMarks-in-Unity

Though i also don't know how to get this VuMarkUI that the article shows. Any hints?

Thanks for any help.

 

If you've downloaded the VuMark sample program, do a search on that folder you should find VuMarkHandler.cs which will have the GetVuMarkString method.

 

Hope this helps,

Thanks,

Will 

VuMarks Multiple Targets (multiple objects for data)

October 12, 2016 - 9:08am #4

Hello,

 

where did you find this VuMarkHandler script? I can't see it in the vuforia unity extension in my projects and also have no access to it in the scripts.

The only result in google is your post and

https://library.vuforia.com/articles/Solution/Working-with-VuMarks-in-Unity

Though i also don't know how to get this VuMarkUI that the article shows. Any hints?

Thanks for any help.

VuMarks Multiple Targets (multiple objects for data)

September 16, 2016 - 11:53am #3

I used the following code to set the text to the marker ID on a TextMesh I placed as a child to the VuMark prefab in the example scene.  In the VuMarkEventHandler script attached to the VuMark object, in its OnTrackingFound() method, I put the following code:

 

VuMarkAbstractBehaviour behaviourThatHasTheInfo = (VuMarkAbstractBehaviour) mTrackableBehaviour;

string markerID = GetVuMarkString(behaviourThatHasTheInfo.VuMarkTarget);

TextMesh text = GetComponentInChildren<TextMesh>();

text.text = markerID;

 

This showed the appropriate markerID on each Vumark as it came into view, no matter how many were in the viewfinder simultaneously.

 

Note:  the GetVuMarkString method was copied over from the VuMarkHandler script.

VuMarks Multiple Targets (multiple objects for data)

September 11, 2016 - 3:24am #2
Log in or register to post comments