[英]How do I change location of pivot point in SceneKit
心脏(可能)不是场景的根节点。 它是根节点的子节点(默认摄像头和任何灯光)。 所以你可以试试
// (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流量表明(但没有证明)在场景编辑器中设置的某些参数在运行时不受尊重。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.