How to render a UIView with transparent background on an SCNPlane in ARKit?

前端 未结 1 1555
后悔当初
后悔当初 2021-01-13 11:25

My UIView has a UIColor.clear background. I am instantiating the View Controller from a storyboard.

When I set SCNPlane geometry\'s diffuse

1条回答
  •  温柔的废话
    2021-01-13 11:52

    Try setting your view's isOpaque property to false:

    let material = SCNMaterial()
    viewController.view.isOpaque = false
    material.diffuse.contents = viewController.view
    planeGeometry.materials = [material]
    

    0 讨论(0)
提交回复
热议问题