This code strangely doesn't animate the fStop:
while this one does:
Why?
Code Block cameraNode.camera!.wantsDepthOfField = true cameraNode.camera!.focusDistance = 2 let animation = CABasicAnimation(keyPath: "fStop") animation.toValue = 0.5 animation.duration = 0.3 cameraNode.camera!.addAnimation(animation, forKey: nil)
while this one does:
Code Block SCNTransaction.begin() SCNTransaction.animationDuration = 0.3 cameraNode.camera!.fStop = 0.5 SCNTransaction.commit()
Why?