I just started studying for ARKitexample and Scenekit. I read a few Scenekit and found out that in order to add text, I need to use SCNText.
I try to write like this but it doesn't show.
guard let pointOfView = sceneView.pointOfView else { return }
let text = SCNText(string: "Hello", extrusionDepth: 4)
let textNode = SCNNode(geometry: text)
textNode.geometry = text
textNode.position = SCNVector3Make(pointOfView.position.x, pointOfView.position.y, pointOfView.position.z)
sceneView.scene.rootNode.addChildNode(textNode)
I just want to add some text (like "hello world") on SCNScene when user press button.
Edit
I saw that text but since I haven't set up plane (or anchor), I can't look at that as if I am in front of that text. How can I do?