0
我知道如何在SCNSphere表面添加紋理,但是當我將相機移動到球體很暗時,所以我想知道如何將紋理添加到內部表面,以下是我現在使用:SceneKit如何添加紋理內部SCNSphere
let boingBall = SCNSphere(radius: 4.0)
let boingBallNode = SCNNode(geometry: boingBall)
boingBallNode.position = SCNVector3(x: 0, y: 3, z: -10)
scene.rootNode.addChildNode(boingBallNode)
let material = SCNMaterial()
material.diffuse.contents = UIImage(named: "texture.png")
material.specular.contents = UIColor.whiteColor()
material.shininess = 1.0
boingBall.materials = [ material ]
感謝
表面內部是否有任何照明?材料是雙面的嗎? –
和雙面他意味着你材料的'doubleSided'屬性是'YES'(默認是'NO') – mnuages
@mnuages是的,你是對的! – user1058113