心脏(可能)不是场景的根节点。它是根节点的子级(默认摄像头和任何灯光也是如此)。所以你可以尝试
// (use the Scene Editor to figure out what the node name really is)
if let heart = scene.rootNode.childNodeWithName("HEART", recursively: true) {
heart.pivot = SCNMatrix4MakeTranslation(0.5, 0.5, 0.5)
}
至于场景编辑器...您确定要操纵心脏,而不是整个场景吗?我还看到了一些SO和Devforum流量,这些流量表明(但没有证明)在场景编辑器中设置的某些参数在运行时不被接受。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句