【发布时间】:2018-05-16 07:54:51
【问题描述】:
当应用在 ARKit 中检测到至少一架飞机时,我如何获得通知?
我目前正在做这样的事情,但它没有触发/它不相关:
extension MyViewController: ARSCNViewDelegate, ARSessionDelegate {
internal func setupAR() {
let scene = SCNScene()
sceneView.scene = scene
let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = [.horizontal]
sceneView.session.delegate = self
sceneView.session.run(configuration)
}
public func session(_ session: ARSession, didUpdate anchors: [ARAnchor]) {
if !anchors.isEmpty {
print("ANCHORS NOT EMPTY")
planesDetectedState()
} else {
print("Anchors is empty")
}
}
}
【问题讨论】:
-
如果它解决了您的问题,请接受其中一个答案作为正确答案。这样,检查此问题的其他人可以确定该解决方案有效。如果答案不起作用,如果您能告诉我们,那就太好了。发送。
-
@Manganese 我仍然需要对它们进行测试。同时感谢您的帮助
-
当然,希望它有效。