1 Reply
      Latest reply on Jun 12, 2019 2:45 PM by jakethesnake
      jjustind Level 1 Level 1 (0 points)

        Has anyone been able to get this to work? I've been running Apple's own example code and it seems to fail as well. We're using an iPad mini 5th gen. Here is the code that we're working with:

         

         

            override func viewDidLoad() {
                super.viewDidLoad()
          
                guard let configuration = self.arView.session.configuration as? ARWorldTrackingConfiguration, ARWorldTrackingConfiguration.supportsFrameSemantics(.personSegmentation) else {
                    print("Failed to create config")
                    return
                }
               
                configuration.frameSemantics.insert(.personSegmentation)
                self.arView.session.run(configuration)
               
               
               
           
            }
           
           
            @IBAction func userDidTapToPlaceGlobe(_ sender: Any) {
               
                let anchor = AnchorEntity(plane: .horizontal, minimumBounds: [0.15, 0.15])
                arView.scene.anchors.append(anchor)
               
                guard let url = Bundle.main.url(forResource: "earth", withExtension: "usdz") else { return }
               
                _ = ModelEntity.loadModelAsync(contentsOf: url)
                    .sink(receiveValue: { (entity) in
                       
                        anchor.children.append(entity)
                        entity.scale = [1,1,1] * 0.05
                       
                        entity.generateCollisionShapes(recursive: true)
                        self.arView.installGestures([.translation, .scale, .rotation], for: entity)
                    })
            }