2017-07-29 102 views
1

我想光(点)安装到相机:演员影子节点ARKit现场

fileprivate lazy var spotLight: SCNLight = { 
     let spotLight = SCNLight() 
     spotLight.type = .spot 
     spotLight.spotInnerAngle = 0 
     spotLight.spotOuterAngle = 45 
     spotLight.castsShadow = true 
     return spotLight 
    }() 

sceneView.pointOfView?.light = spotLight 

但有一个问题。光效果不错,但没有影子。怎么了?

enter image description here

回答

1

别的地方移动聚光灯(即不使用完全相同的位置来看,否则会影背后你所看到的)。

0

在下面放置一个平面,将其设置为取消选中所有rgba值。 转到光源节点,设置投射阴影,将其设置为延迟。