mozilla-mobile / webxr-ios

An iOS app for testing WebXR
Mozilla Public License 2.0
210 stars 41 forks source link

Some objects disappear after relocalizing from backgrounded state #161

Closed robomex closed 5 years ago

robomex commented 5 years ago

To reproduce:

Planes/anchors don't disappear in the similar sessionInterruptionEnded, nor do user-placed anchors (e.g. boxes in the Hit Testing example) disappear after relocalizing from a backgrounded state.

The device-side, ARKit plane anchors aren't disappearing – it's planeAnchors disappearing from the objects array that's passed to the WebXR page for it to render (e.g. in the 'World Sensing' example).

blairmacintyre commented 5 years ago

just so I understand: are the planeAnchors still being sent into the web page? is the bug on the javascript side, or the app side?

robomex commented 5 years ago

I believe I've narrowed the bug down to some older app-side code dealing with resuming sessions – let me look at it/test it some more and I'll plan on either committing a fix or continuing the discussion here tomorrow.

robomex commented 5 years ago

The commit that addresses this issue lets ARKit handle automatic relocalization of the world map when the app is returning from being backgrounded as opposed to the previous method of explicitly resuming/running a session with the previously saved worldMap loaded as the initialWorldMap.

My testing didn't turn up any issues – but I'd really like to get others testing this code and the upcoming TestFlight that uses this code to see if any problems arise.