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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Value of the "OnApplicationFocus" is "True" when Player loses the focus before it launches
- .mp3 playback position is inaccurate when loaded with .streamAudio while in Play Mode
- DateTime.Now returned time is 1 hour behind when system time zone is set to Morocco
- Media Encoder produces incorrectly muxed WebM videos by improperly distinguishing I-frames from P-frames when encoding with alpha channel
- "State comes from an incompatible keyword space" errors are thrown when saving changes in Shader Graph where sprite is casted as a shadow
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.