MrScreeps
MrScreeps

Reputation: 21

How to disable image detection if there is already a detected image

I have the, in my opinion, simple problem of disabling image detection with the AR Camera. I have the problem, that my app detects an image from the image library and spawns an object etc. everything according to plan.

But the problem is that if move the camera over another detectable image, it recognizes it. This is bad not because it spawns something additionaly but because you can "collect" the images in my app, so it unlocked the other detected one even though it shouldn´t.

So how can I disable image detection without turning off the AR-Camera?

I so far tried to simply disable the "ARManager" and the "ARTrackedImageManager" script (.enabled=false), but it didn´t solve my problem, because the app still detects other images.

Hope I could explain what my question and problem is properly. Any help is appreciated!

Upvotes: 0

Views: 322

Answers (1)

bpedazur
bpedazur

Reputation: 381

It really depends on what library you're using to detect the image. Generally, most marker tracking libraries will create a marker object in your Unity scene. You can disable these marker objects after you find one, and only leave the marker you're interested in. Make sure you also set the number of tracked images to 1 so you won't accidentally find two markers in one frame.

Upvotes: 0

Related Questions