My app uses RealityKit with an arView with World tracking and a scene construction mesh. Working well. As I understand it, the default camera selection using ARIkit, is ultra wide camera. However, in the camera app, there is a 0.5 option to increase the field of view further. Is there any way to enable this 0.5x option using code? Or any control over FOV using RealityKit and a mesh?
Thanks!
The ultrawide camera—the one Camera shows as “0.5×”, as opposed to the regular wide-angle one which is “1×” and the is default for ARKit—is supported in some ARSession configurations; there’s an example of how to check whether it’s available, and select it if so, in the captureDeviceType documentation. Note that that example is with a face-tracking configuration; if you’re doing world tracking instead, use ARWorldTrackingConfiguration.
To use your configured session with an ARView, you’d use the init(frame:cameraMode:automaticallyConfigureSession:) ARView initializer with the last parameter set to false, then supply your ARSession to the session property (then call run
on it, as noted in the discussion on the latter page).