我的材料只适用于一半的脸。这是我的代码:
let boxGeometry = SCNBox(width: 10, height: 10, length: 10, chamferRadius: 0)
let boxNode = SCNNode(geometry: boxGeometry)
boxNode.position = SCNVector3Make(0, 0, -20)
boxNode.runAction(SCNAction.repeatActionForever(SCNAction.rotateByX(1, y: 2, z: 0, duration: 1)))
boxNode.geometry?.firstMaterial?.diffuse.magnificationFilter = SCNFilterMode.Nearest
boxNode.geometry?.firstMaterial?.diffuse.minificationFilter = SCNFilterMode.Nearest
var texture = SKTexture(imageNamed:"fixed!_textures_blocks_blockRedstone.png")
texture.filteringMode = SKTextureFilteringMode.Nearest
boxNode.geometry?.firstMaterial?.diffuse.contents = texture
var material = SCNMaterial()
material.diffuse.contents = UIColor.blueColor()
boxNode.geometry?.insertMaterial(material, atIndex: 1)
view.scene?.rootNode.addChildNode(boxNode)
我创建了一种新材料并添加了蓝色。有人知道为什么它只适用于六分之三的面孔吗?谢谢