Phone camera autofocus

Hey there

Making a phone app that makes use of the camera on the back of the phone. However at the moment i’m having issues with focus. Does anyone know the javascript method of doing this.

Thanks in advance

There is no way to control the focus of a hardware camera through Unity. You might be able to do it with a native plugin (see, for example, Android’s FOCUS_MODE and FOCUS_DISTANCE parameters - Camera.Parameters  |  Android Developers), but this would obviously be device-specific.

@rprrs I have written an adroind plug-in for unity3d, but for some reason it does not work. I am happy to share my code if anyone is interested. Perhaps you can go through it and see if you can get it to work?