title: How to add SCNLookAtConstraint on SCNCamera node in Xcode 9 beta 6 for iOS 11 device
body: <p>Adding an SCNLookAtConstraint on an SCNCamera node causes a problem when the user double taps the target node in the SCNScene. This problem is new in Xcode 9 beta and doesn't exist when the code is run on iOS 10 device. I filed a bug report with Apple but would appreciate any advice on a work around, besides not adding a constraint. To see the problem, please follow the steps below.</p>
  
  <ol>
  <li><p>Create a new project in Xcode 9 beta 6, selecting the Game application template with Swift for the language and SceneKit for the game technology.</p></li>
  <li><p>Add the following two lines of code in GameViewController.swift after the existing line that retrieves the ship node</p>
  
  <pre><code>let constraint = SCNLookAtConstraint(target: ship)
  cameraNode.constraints = [constraint]
  </code></pre></li>
  <li><p>Build and Run the code on a device with iOS 11 beta 8; I ran the code on a 10.5-inch iPad Pro with iOS 11 beta 8.</p></li>
  <li><p>Use one finger to reposition the rotating ship so that the axis of rotation is perpendicular to the screen.</p></li>
  <li><p>double tap the ship with one finger</p></li>
  </ol>
  
  <p>Expected Results:
  The ship should reposition and reorient itself to its original position, with its original axis of rotation and rotation rate.</p>
  
  <p>Observed Results:
  The ship spins more and more rapidly, while at the same time getting larger and larger, until it is either barely or no longer in view.</p>