September 2018
Intermediate to advanced
434 pages
8h 47m
English
Create a new setupGame function. We start adding game objects to the scene. To do this, add the following to the setupGame function.
The first thing we do in the setupGame function is disable the checking of planes in the scene. Add the following code to change the configuration and run the new configuration:
configuration.planeDetection = ARWorldTrackingConfiguration.PlaneDetection(rawValue: 0) sceneView.session.run(configuration)
Then we add a light source to the scene:
let directionLight = SCNLight() directionLight.type = SCNLight.LightType.directional directionLight.castsShadow = true directionLight.shadowRadius = 200 directionLight.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: ...
Read now
Unlock full access