I'm working on an ARKit app for iPhone and iPad and I'm having some troubles getting the shadows to work in the live view from the camera. My scene (ShadowTest.scn) looks like the following:
I have unchecked Red, Green, Blue, and Alpha for the Write to Color property on the material for the plane as well as set the visibility to Cull back.
For the directional light, Enable Shadows is selected and the mode is set to Deferred.
In the scene file itself, everything looks good. The shadow is visible and the plane is not.
My issue is when I go to add it to my scene view. This is how I'm adding it to my scene:
func addTestBox(at position: SCNVector3, rotation: SCNVector4) {
guard let scene = SCNScene(named: "Assets.scnassets/ShadowTest.scn") else {
return
}
let node = SCNNode()
scene.rootNode.childNodes.forEach(node.addChildNode(_:))
node.position = position
node.rotation = rotation
updateQueue.async { [weak self] in
self?.sceneView.scene.rootNode.addChildNode(node)
}
}
When the nodes are added to my scene, the shadow is not visible at all.
The lighting appears to be working because it is lit as it should be.
Am I missing some very obvious setting on the light/plane/cube/scene view that is needed to make the shadows show up?
Thank you in advanced for all the help.

