title: How can I set text orientation in ARKit?
body: <p>I am creating a simple app with ARKit in which I add some text to the scene to the tapped position:</p>
  
  <pre><code>@objc func tapped(sender: UITapGestureRecognizer){
      let sceneView = sender.view as! ARSCNView
      let tapLocation = sender.location(in: sceneView)
      let hitTest = sceneView.hitTest(tapLocation, types: .featurePoint)
      if !hitTest.isEmpty{
          self.addTag(tag: "A", hitTestResult: hitTest.first!)
      }
      else{
          print("no match")
      }
  }
  
  func addTag(tag: String, hitTestResult: ARHitTestResult){
      let tag = SCNText(string:tag, extrusionDepth: 0.1)
      tag.font = UIFont(name: "Optima", size: 1)
      tag.firstMaterial?.diffuse.contents = UIColor.red
  
      let tagNode = SCNNode(geometry: tag)
  
      let transform = hitTestResult.worldTransform
      let thirdColumn = transform.columns.3
      tagNode.position = SCNVector3(thirdColumn.x,thirdColumn.y - tagNode.boundingBox.max.y / 2,thirdColumn.z)
      print("\(thirdColumn.x) \(thirdColumn.y) \(thirdColumn.z)")
      self.sceneView.scene.rootNode.addChildNode(tagNode)
  }
  </code></pre>
  
  <p>It works, but I have problem with the orientation of the text. When I add it with the camera's original position, the text orientation is ok, I can see the text frontwise (Sample 1). But when I turn camera to the left / right, and add the text by tapping, I can see the added text from the side (Sample 2).</p>
  
  <p>Sample 1:</p>
  
  <p><a href="https://i.stack.imgur.com/YXfkl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YXfkl.png" alt="3-D letter from the front"></a></p>
  
  <p>Sample 2:</p>
  
  <p><a href="https://i.stack.imgur.com/E1NAo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/E1NAo.png" alt="3-D letter from the side"></a></p>
  
  <p>I know there should be some simple trick to solve it, but as a beginner in this topic I could not find it so far.</p>