0.5 zoom on RealityKit back camera

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!

Answered by Engineer in 807790022

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).

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).

Thanks! I’m running the app on an iPhone 15 Pro Max.

iIran your suggested .captureDeviceType and the builtInUltraWideCamera was not available. The .builtInWideAngleCamera was available. Yet, as I understand it, the bottom lens is the Ultra wide lens.

What do I need to do to get access to the ultra wide lens?

0.5 zoom on RealityKit back camera
 
 
Q