【发布时间】:2017-09-12 02:38:07
【问题描述】:
我试图让 SceneKit 中的文本节点始终指向我 - 即指向我的相机位置。由于某种原因,它不会旋转而是保持静止:
let text = SCNText(string: "My String", extrusionDepth: 0.1)
text.font = UIFont(name: "Arial", size: 10)
let textNode = SCNNode(geometry: text)
textNode.position = position
//Here I add the constraint to the SCNView's pointOfView node
let lookAtConstraint = SCNLookAtConstraint(target: scnView.pointOfView)
textNode.constraints = [lookAtConstraint]
我在这里错过了什么?
【问题讨论】:
-
您是否正在创建平视显示器?
-
如果您回答我的问题,我想我可以帮助您解决问题。我正在尝试确定您要完成的工作。
-
抱歉出差了。是的,尝试平视显示器。我现在使用 SCN BillboardConstraint。谢谢!