google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.91k stars 1.2k forks source link

Camera matrix doesn't update when ARCore switches to another camera #1616

Open DennisBauer opened 8 months ago

DennisBauer commented 8 months ago

SPECIFIC ISSUE ENCOUNTERED

On the Pixel 7 Pro ARCore switches to the wide angle camera when going close to something and autofocus is enabled. There's no way this can be influenced and I couldn't find anything in the changelog or the documentation of the focus mode. The problem with this happening is that the viewport changes but the camera matrix doesn't update so I cannot adapt to the changes and fix the positioning of my 3D objects.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

  1. Use the hello_ar_kotlin sample project and enable auto focus
  2. Open the app, put it to the background and foreground again (workaround to fix existing autofocus issue: https://github.com/google-ar/arcore-android-sdk/issues/1312#issuecomment-995514679)
  3. Move the device slowly close to a surface. At a specific distance (about 10cm) ARCore switches to the wide angle camera of the device. When moving further away it switches back.

WORKAROUNDS (IF ANY)

ADDITIONAL COMMENTS