小编Aas*_*lam的帖子

获取 ARKIT 中聚焦相机的所有 ARAnchors

当应用程序首先启动时,在一面墙上检测到垂直表面,而不是相机聚焦到第二面墙,在第二面墙上检测到另一个表面。第一面墙现在对 ARCamera 不再可见,但此代码为我提供了第一面墙的锚点。但我需要第二面墙的锚点,现在在相机中可见/聚焦。

if let anchor = sceneView.session.currentFrame?.anchors.first {
    let node = sceneView.node(for: anchor)
    addNode(position: SCNVector3Zero, anchorNode: node)
} else {
    debugPrint("anchor node is nil")
}
Run Code Online (Sandbox Code Playgroud)

ios scnscene arkit

2
推荐指数
1
解决办法
1384
查看次数

标签 统计

arkit ×1

ios ×1

scnscene ×1