Unity-Technologies / arfoundation-samples

Example content for Unity projects based on AR Foundation
Other
3.06k stars 1.15k forks source link

[Bug] Paused/Resumed Session - Raycast stop working on previously detected ARPlanes. #922

Closed XubeiX closed 2 years ago

XubeiX commented 2 years ago

Unity bug report case number Case 1388163

Describe the bug Once the AR session is paused and resumed, we lose the ability to interact with previously detected ARPlanes. Detected ARPlanes are visible and in correct position after relocation, but Raycast doesn't work on it, it doesn't detect it. Also ARPlanes are not updated.

The same thing happens when the app goes into the background and we return to it.

To Reproduce Steps to reproduce the behavior:

  1. Clone and run ARFoundation-samples (Master branch).
  2. Run Simple AR Scene
  3. Detect ARPlane and place cube on it.
  4. Press Pause button (screen turns black) after that press Resume button.
  5. Try to place cube on the same ARPlane (it is impossible). On a newly detected plane this will work.

Expected behavior After resume session we still should have possibility to interact with previously detected ARPlanes.

Actual behavior Once the session is resumed, we are unable to interact with previously detected ARPlans.

Smartphone (please complete the following information):

ankur-unity commented 2 years ago

As mentioned in the issue tracker, a new AR Plane Debug Visualizer is added in 3e93324131523fe2ab526518ac69956ad7f12095. The SimpleAR sample scene is updated with this visualizer (README). It will show the planes in red if the tracking state is TrackingState.Limited.