Game Development Reference
In-Depth Information
Figure 11-7 . Scene graph render cycle
In your game you will use the render delegate method for your game logic.
func renderer(aRenderer: SCNSceneRenderer,
didSimulatePhysicsAtTime time: NSTimeInterval)
As you can see in Figure 11-5 , this is one of the last callbacks that you can use, and it ap-
pears after the physics and animations are applied. You will want to use this delegate so
that you can check for collisions within the scene.
The update delegate is a common method that is used frequently in Scene Kit develop-
ment. This delegate allows you to make changes to the scene before the animations or
physics run. You can use it when you are changing the lighting or want to transform an
object.
renderer(aRenderer: SCNSceneRenderer!, updateAtTime time:
NSTimeInterval)
The didApplyAnimation callback is called after the animation has completed.
Scene Kit's Built-in Model Classes
Scene Kit provides almost all the primitive geometries that you will need in order to cre-
ate immersive games.
SCNGeometry Objects
Search WWH ::




Custom Search