您好,我正在尝试创建一个AR应用程序,我在每个文件中订购了几个不同的目录,现在当我想创建场景时,我无法捕获我的Models.scnscene目录,我试图这样做在很多方面,但每次我有相同的错误,这是SCNSCENE是零。
let scene = SCNScene(named: "cup.scn", inDirectory: "../Resources/Models.scnassets", options: nil)
let node = scene?.rootNode.childNode(withName: selectedItem, recursively: false)
let transform = hitResults.worldTransform
let thirdColumn = transform.columns.3
node?.position = SCNVector3(thirdColumn.x, thirdColumn.y, thirdColumn.z)
self.sceneView.scene.rootNode.addChildNode(node!)