When using the plane PlaneDetectionProvider in visionOS I seem to have hit a limitation which is that regardless of where the headset is in the space, planes will only be detected that are (as far as I can tell) less that 5m from the world origin. Mapping a room becomes very tricky as a result because you often find some walls are outside the radius, even if you're standing two feet away from a ten foot wall. It just won't see it. I've picked my way through the documentation but I cannot see any way to extend this distance. Am I missing something?
PlaneDetectionProvider on VisionOS seems to limit detection to planes less than5 m from world origin.
Hello @kallipigous
This limitation sounds unexpected. I created a test app and plane detection continued 15 meters away from the origin. I stopped at 15 because the hallway ended :) Are you keeping a strong reference to the ARKitSession
(eg is it an instance variable)? If not, please try that. If that doesn't fix the issue, please share a focused code snippet that reproduces the issue so I can help you troubleshoot.
Well that's encouraging. I do have a reference to the ARKitSession. I am also running the world tracking provider at the same time so I can track the head. I wonder if that's changing things? I'm also running the 2.0 beta.
This is how I originate the session
try? await session.run([worldInfo, planeData])
but everything I get back in
.task {
for await update in planeData.anchorUpdates {
}
}
seems to be filtered within 5 meters of the origin.
I made a simple example and it seemed to be working fine. So I have worked my way back through rewritten everything and it's working again. I'm not sure why the planes were not being added after the initial flush, but it seems to work fine now. Thank you for your help. Much appreciated.