【发布时间】:2016-12-16 01:35:32
【问题描述】:
如何“放大”模特的脸?我想要达到的效果是让模特的脸占据整个圆圈。 Link to pic
我尝试将 cameraNode.position 的 Z 值更改为小于 2,但随后模型剪辑。我也尝试过更改cameraNode.camera.zNear 和cameraNode.camera.zFar,但没有任何显示。 cameraNode.camera.xFov 和 cameraNode.camera.yFov 如果我不更改它们,它们都是 0.0。
// Get the model height
var minPoint = SCNVector3Zero
var maxPoint = SCNVector3Zero
modelNode.getBoundingBoxMin(&minPoint, max: &maxPoint)
let modelHeight = maxPoint.y - minPoint.y
// Remove old camera
self.cameraNode.removeFromParentNode()
cameraNode = SCNNode()
// Set up a new camera
cameraNode.camera = SCNCamera()
cameraNode.position = SCNVector3(0, modelHeight, 2)
// Set up LookAtConstraint
let constraint = SCNLookAtConstraint(target: SCNNode())
constraint.target.position = SCNVector3(0, modelHeight, 0)
cameraNode.constraints = [constraint]
self.rootNode.addChildNode(cameraNode)
【问题讨论】: