Log in or register to post comments

Trigger the camera focus by screen tap

November 4, 2020 - 1:49am #1

I'm aware of setting the various camera focus modes (continuous, infinity, macro, etc.) using Vuforia.  I am wanting to run continuous autofocus and have the option for the user to tap the screen to trigger a refocus once the app is loaded.  How do I go about doing this?  I am using Unity 5.3.4 and Vuforia 5.5.9 and would like to accomplish this in a c# script.

Trigger the camera focus by screen tap

November 4, 2020 - 5:29am #2

Hi,

In our CoreSampes available through the Unity store we demo this options for example in our Image Target scene.

Please check the sample and to be more specific our MenuOptions.cs script.

Also we use following to activate autofocus: https://library.vuforia.com/content/vuforia-library/en/reference/unity/classVuforia_1_1CameraDevice.html#a9b3f89e32897a76acebd03a5bebb722c

Please note the Unity/Vuforia SDK versions are quite old and I would advise to upgrade to the latest versions. For SDK 9.5 we recommend 2019.4

Thank you.

Vuforia Engine Support

Log in or register to post comments