Yesterday, at
CocoaConf San Jose, I gave a talk on
SceneKit. This talk was based on my
earlier blog post on the subject, but contained some new materials. The source code and the keynote for the presentation are available
on my GitHub account.
The source code is based on the code from my earlier blog post, but contains some new examples.
One of the session attendees e-mailed me after the session with some information. In the session I said that there was no way to specify which camera was used if you had multiple cameras in the scene. This is actually incorrect.
SCNViews and
SCNLayers conform to a protocol called
SCNSceneRenderer. That protocol has a property called
pointOfView that can be used to specify on a per-view level which camera is used.
I've added a sample project to the repository called
SceneKitFun/Multiple Cameras that shows this in action. There's one scene, but two different views showing the scene from different cameras. This project also shows how to use stock
SCNViews with a view controller rather than creating a custom subclass of
SCNView, which is probably how you'll want to structure most real-world SceneKit projects. I've also put a note in the presentation on the incorrect slide.
My sincere thanks to Thomas Goossens for pointing this out to me.