I am attempting to animate the camera node in Scenekit while having the camera look at a specific point with a constraint. For some reason activating the constraint locks the camera position. Is there a specific reason this does not work or what am I missing here?
cameraNode = SCNNode()
let camera = SCNCamera()
cameraNode.camera = camera
cameraNode.position = SCNVector3Make(5.0, 10.0, 5.0)
scene.rootNode.addChildNode(cameraNode)
let center = SCNNode()
center.position = SCNVector3Make(0, 0, 0)
let lookConstraint = SCNLookAtConstraint(target: center)
cameraNode.constraints = [lookConstraint]
let firstAnimation = SCNAction.move(to: SCNVector3Make(10, 10, 10), duration: 2.0)
let secondAnimation = SCNAction.move(by: SCNVector3Make(0, 5, 5), duration: 2.0)
let sequence = SCNAction.sequence([firstAnimation, secondAnimation])
cameraNode.runAction(sequence)