title: SCNCamera made programmatically not in the correct position
body: <p>I am trying to programmatically create a camera for my <code>MainScene.scn</code> file.</p>
  
  <p>I need to create the camera in code, as I am wanting to make a <a href="https://stackoverflow.com/questions/25654772/rotate-scncamera-node-looking-at-an-object-around-an-imaginary-sphere/25674762">camera orbit</a> node, and this is the only way I can think of. I also would like to keep using my scene file.</p>
  
  <p>This is my code (simplified) from my view controller:</p>
  
  <pre><code>import UIKit
  import SceneKit
  
  class GameViewController: UIViewController {
  
      // MARK: Scene objects
      private var gameView: SCNView!
      private var gameScene: SCNScene!
      private var gameCameraNode: SCNNode!
  
      // MARK: View controller overrides
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Setup game
          initView()
          initScene()
          initCamera()
      }
  }
  
  private extension GameViewController {
  
      // Initialise the view and scene
      private func initView() {
          self.view = SCNView(frame: view.bounds) // Create an SCNView to play the game within
          gameView = self.view as? SCNView // Assign the view
          gameView.showsStatistics = true // Show game statistics
          gameView.autoenablesDefaultLighting = true // Allow default lighting
          gameView.antialiasingMode = .multisampling2X // Use anti-aliasing for a smoother look
      }
      private func initScene() {
          gameScene = SCNScene(named: "art.scnassets/MainScene.scn")! // Assign the scene
          gameView.scene = gameScene // Set the game view's scene
          gameView.isPlaying = true // The scene is playing (not paused)
      }
      private func initCamera() {
          gameCameraNode = SCNNode()
          gameCameraNode.camera = SCNCamera()
          gameCameraNode.position = SCNVector3(0, 3.5, 27)
          gameCameraNode.eulerAngles = SCNVector3(-2, 0, 0)
          gameScene.rootNode.addChildNode(gameCameraNode)
          gameView.pointOfView = gameCameraNode
      }
  }
  </code></pre>
  
  <p><em>This code can easily be pasted to replace the default view controller code. All you need to do is add the <code>MainScene.scn</code> and drag in something like a box.</em></p>
  
  <p>If you try the code, the camera is in the wrong position. If I use the same properties for the camera in the scene, it works, but that is not what I am looking for.</p>
  
  <p>From what I have read, SceneKit may be creating a default camera as said <a href="https://stackoverflow.com/questions/28480706/adding-camera-in-scnscene/28489188#28489188">here</a> and <a href="https://stackoverflow.com/questions/24768031/can-i-get-the-scnview-camera-position-when-using-allowscameracontrol/24768474#24768474">here</a>. However, I am setting the <code>pointOfView</code> property just as they said in those answers, but it still does not work.</p>
  
  <p>How can I place my camera in the correct position in the scene programmatically?</p>