iOS SceneKit:摄像机后面的TextNode

时间:2016-09-21 09:36:49

标签: ios swift scenekit

我有一些SCNText节点,描述如下:

let newText = SCNText(string: "", extrusionDepth:0.1)
    newText.alignmentMode = kCAAlignmentCenter
    newText.font = UIFont (name: "Arial", size: 3)
    textNode = SCNNode(geometry: newText)
    self.addChildNode(textNode)

如何使文字始终看着相机?

1 个答案:

答案 0 :(得分:2)

textNode.constraints = [SCNBillboardConstraint()]