SceneKit features introduced in iOS 9 / Xcode 7
Let's go back to transitions and animations. As of iOS 9, we can change a character or other 3D object's blend mode very easily in SceneKit.
Blend modes can be changed simply with one line, aSCNMaterial.blendMode = .Add
, where aSCNMaterial
is an object representing the material of SCNNode
. Changing blend modes can create a number of effects. Some games use a player's ghost to show a past run through they are trying to beat, or there's the fade effect boss characters make when defeated. Combine with SCNTransaction
to have characters fade in and out of these modes.
Audio nodes and 3D sound
As of iOS 9, we can place 3D sounds into our SceneKit scenes. The addAudioPlayer()
function of the SCNNode
class function lets us append a sound to that node, and wherever that node is in 3D space, the sound will adhere to 3D audio mixing; that is, if the audio source's positional
property is set to...