I want to make an object to disappear when one of my Image Marker is matching and when other Image Marker is recognized that object to be visible again (is a button on my canvas). I’ve tried to that using those functions : OnMatchAcquire and OnMatchLoss , but only first one is called and when i put my camera on the second Image Target first Image Target is still recognized. Here being the second problem. How to reset those conditions when one Image Target is recognized other to be not.
Hi
The big issue you are running up against is that an image marker provider is not necessarily going to consider an image marker that is out of view to be ‘lost’. Many of them will continue to just assume they are located in space where they were previously.
I would recommend creating a script that examines if particular objects (your image markers) are active and within the camera frustum. If the amount of objects is 1, show the button, otherwise hide it.
Thread details some methods for checking if things are in view:
Using worldToViewportPoint is probably the most straightforward, though you might get loss cases when things are near the edge depending on the size of the image marker.
Using the frustum planes is most accurately but a little more complex scripting-wise
Well, i did it with frustum planes , thanks !!!
Any idea when unity mars will have a simulation in real time for image markers (like that one in Vuforia )?
Because is very stressful to build every time to verify! :))
I don’t know if this is what you are looking for this but by using Mars Panel with simulation view open, you can instantiate an synthetic Image Marker ,set an image to it in your simulation and it will avoid to build every time.