Camera Controls
The WikitudeCamera
also provides APIs to change the settings on the device camera.
Please see the Camera Controls - Changing Camera Settings
scene for an example on how to use camera controls.
Camera position
The DevicePosition
property enables you to change between the back and front camera of the device.
Focus Mode
The FocusMode
property can change the camera focus mode between Locked
, which will keep the current focus, Once
, which will try to focus the camera only once and Continuous
which will constantly adapt the focus of the camera to changes in the view.
Manual Focus
The ManualFocus
property allows the focal length to be set at a custom distance when the FocusMode
is set to Locked
. The property accepts values from 0 to 1, where 0 means focusing the camera as close as possible.
Flash Mode
The FlashMode
property allows you to turn on the camera flash.
Zoom Level
The ZoomLevel
property changes the zoom level used by the camera. Valid values are between 1.0 and MaxZoomLevel
. Be sure tu query the MaxZoomLevel
property first. A MaxZoomLevel
value of 1.0 indicates that the device doesn't support zooming.
Auto Focus Restriction (iOS only)
The AutoFocusRestriction
property let's you restrict the auto focus on the camera to either Near
or Far
. By default it is not restricted.