How to disable plane detection. Swift + ARKit

2k views Asked by At

I've seen plenty of tutorials and suggestions on plane detection but I haven't seen any on how to disable once enabled plane detection. I want to disable plane detection and detected planes after I put my nodes on them

1

There are 1 answers

4
pj_mukh On BEST ANSWER

At any point, you can reconfigure the ARKit Session. So, in swift, you can do:

let configuration = ARWorldTrackingConfiguration();
//...any other configurations
configuration.planeDetection = [] //empty array (as opposed to .horizontal .vertical) 
sceneview.session.run(configuration)

There's a good example of this running within the context of an app here where you can turn on/off Plane detection in the UI