Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

4.0.2

Issue ID

1261310

Regression

No

[ARFoundation][Mobile] GameObjects get stuck to the camera after switching between User and World

Package: ARFoundation

-

Repro steps:
1. Open attached project
2. Build and Run on Android/iOS
3. Press "Spawn" to place a sphere in front of the camera
4. "Switch Camera" a few times

Actual: Notice that at some point the sphere gets stuck to the camera and is displayed in 2D

Reproducible with: 2019.4.4f1, 2020.1.0b16, 2020.2.0a18 - ARFoundation 4.1.0-preview.5

Tested and reproduced on these devices:
VLNQA00294, Oppo Reno Z 中国版 (PCDM10), Android 9, CPU: Mediatek MT6779 Helio P90, GPU: PowerVR Rogue GM9446
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00128, Samsung Galaxy Note8 (SM-N950F), Android 9, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
iPhone 11 (iOS 13.5)
iPhone XR (iOS 13.4.1)

  1. Resolution Note:

    This appears to be a bug in ARKit and is reproducible in a purely native project (i.e., outside of Unity). In ARFoundation, it happens when you have ARCameraManager.requestedFacingDirection = CameraFacingDirection.World, ARSession.requestedTrackingMode = TracingMode.PositionAndRotation, and ARFaceManager.enabled = true, and you then change the requestedFacingDirection to CameraFacingDirection.User.

    As a workaround, when you switch to the user-facing camera, also change the ARSession.requestedTrackingMode to TrackingMode.RotationOnly. When you switch back to world facing camera mode, you'll want to make sure you also switch the requestedTrackingMode back to TrackingMode.PositionAndRotation.

    Note that older devices, like the iPhone X, do not support the "Position and Rotation" tracking mode while in a user-facing camera mode, so you will only see this situation on newer devices like the iPhone 11.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.