title: Get SKCameraNode to follow a hero Spritenode
body: <p>I can't seem to figure this out. I've tried many different things and none of them seem to work. With my current code, the camera and the hero never line up and the scene seems to jump pretty far when I touch the screen. All I want to do is when I touch the screen have the hero move to the touch point and have the camera follow him. Is there some way to lock the camera to the hero spritenode?</p>
  
  <pre><code>import SpriteKit
  
  
  let tileMap = JSTileMap(named: "level2.tmx")
  let hero = SKSpriteNode(imageNamed: "hero")
  let theCamera: SKCameraNode = SKCameraNode()
  
  class GameScene: SKScene {
      override func didMoveToView(view: SKView) {
          /* Setup your scene here */
  
         self.anchorPoint = CGPoint(x: 0, y: 0)
         self.position = CGPoint(x: 0, y: 0)
  
          hero.position = CGPoint(x: CGRectGetMidX(self.frame), y: CGRectGetMidY(self.frame))
  
  
  
          hero.xScale = 0.5
          hero.yScale = 0.5
          hero.zPosition = 2
  
          tileMap.zPosition = 1
  
  
          tileMap.position = CGPoint(x: 0, y: 0)
          self.addChild(tileMap)
          self.addChild(hero)
          self.addChild(theCamera)
  
          self.camera = theCamera
  
  
      }
  
      override func touchesBegan(touches: Set&lt;UITouch&gt;, withEvent event: UIEvent?) {
         /* Called when a touch begins */
  
          for touch in touches {
  
              let location = touch.locationInNode(self)
  
              let action = SKAction.moveTo(location, duration: 1)
  
              hero.runAction(action)
  
  
  
          }
  
              }
  
      override func update(currentTime: CFTimeInterval) {
          /* Called before each frame is rendered */
  
          self.camera?.position = hero.position
      }
  }
  </code></pre>