"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Disabling autofocus (preferably on iOS)

Hey all, we're making an experience with relatively small markers (~3") and we want users to be able to get up close to them.  The problem is when users get close, the autofocus wigs out and continuously adjusts itself creating a somewhat jarring experience.

 

Preferably what I'd want is for the camera to be on auto-focus while the user is looking for the target, then lock focus as soon as they've found it, however it looks like the only two options for iOS are continuous auto-focus and "normal" (whatever that means).  Is there any way to disable auto-focus?

Hello,

This should be possible as long as you're using the legacy iOS camera and not the ARKit camera. Use the Fusion Provider APIs to set Vuforia to use our legacy SLAM Extended Tracking, and Vuforia APIs to control the auto focus modes.

joeweitzel

Sun, 04/14/2019 - 18:46

In reply to by medabit

Hi, sorry to bring back an old thread, but I'm not able to disable autofocus (Vuforia 8.1.7, Unity 2018.3.12f1), I've attempted:

Like the previous message says, you'll have to set the fusion provider yourself.  ARKit is the default provider if it is available.

Sorry, I have to be missing the point here. I've built and completed a Unity/Vuforia iOS App and it works perfectly with no issues. An now I have to rebuild it just to disable autofocus?

Hello,

[quote=joeweitzel]

Sorry, I have to be missing the point here. I've built and completed a Unity/Vuforia iOS App and it works perfectly with no issues. An now I have to rebuild it just to disable autofocus?

[/quote]

joeweitzel

Wed, 04/17/2019 - 16:10

In reply to by medabit

Thanks! What a great answer!

Any chance you could point me to where to add my script? Planned to add it to the ARCamera but that's a guess, and write something like this:

joeweitzel

Sat, 04/27/2019 - 20:19

In reply to by medabit

So I've spent a lot of time getting nowhere with this. Maybe I'm missing the point here or Vuforia doesn't want iOS devices to disable autofocus.

I created this script and nothing changes i form of autofocus. It constantly autofocuses still:

Hello @joeweitzel,

Which iOS device is demonstrating this behavior?

Please note that the functioning of focus modes on a device is solely based upon the OEM's implementation. Vuforia does not have its own implementation of focus algorithms, so our APIs call native OS APIs.