【发布时间】:2017-07-07 08:28:23
【问题描述】:
我创建了一个基本场景,并添加了一个 dae 文件。 首先,每次我运行或保存项目时,我都会弹出: 无法保存文档“billboard.dae”。
虽然它仍然运行但很烦人。
但问题是我无法缩放对象。 我尝试了不同的值 0.5s 和 > 1,但似乎没有任何效果。这是我的代码
override func viewDidLoad()
{
super.viewDidLoad()
sceneView.delegate = self
sceneView.showsStatistics = true
let scene = SCNScene(named: "art.scnassets/billboard.dae")!
let billboardNode = scene.rootNode.childNode(withName: "billboard", recursively: true)
// billboardNode?.position = SCNVector3Make(0, 0, 1)
billboardNode?.position.z = 10
billboardNode?.scale.z = 0.5
// billboardNode?.scale = SCNVector3Make(0.4,0.4, 0.4)
sceneView.scene = scene
}
有什么想法吗?
谢谢
【问题讨论】:
-
您确认
billboardNode不是nil? -
看看这个教程,他们做了类似的事情,这可能会有所帮助:mobile-ar.reality.news/how-to/…