"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

Autofocus

Hi i came across a problem I do not really understand. I used the Vuforia api to activate Autofocus in my Project like so: void Start()

{

CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);

}

(I checked, and the script is actually called)

This however did not make the Samsung S8 i was testing on focus continously like expected instead it stayed unfocused (probably focused at infinity).

When I moved this setting into an Update function it actually made the S8 Autofocus. The Autofocus of a different Android Phone (Huawei P20) did not respond to the workaround but had the same problem of not autofocusing the usual way. Testing on a S7 the Autofocus worked as expected (one call on Start() was sufficient).

Since most Vuforia features stop working with an unfocused camera this seems like a major issue. Any ideas on how to resolve this in a satisfactory way?

Patrick

Hello,

Reviewing our Core samples code, I don't see where we've needed to do anything different to support changing focus modes based upon the device model. Check Assets/Common/Scripts/CameraSettings.cs for our solution.

[Vuforia Engine v10+]

There are two articles that help with setting up autofocus for Vuforia Engine.

 

Unity:

https://library.vuforia.com/platform-support/working-camera-unity

Native: