ios - 来自sketchup的场景包模型消失了
<p><p>我正在玩场景套件。</p>
<p>我对建模了解不多,但我创建了一个非常基本的 Sketchup 模型,没有 Material 或纹理。</p>
<p>我从番茄酱中导出模型并将其导入到场景中。</p>
<p>当我将相机移向模型的一端时,后部会消失,反之亦然。当相机向前旋转时,后面会被黑色阴影覆盖。</p>
<p>这是什么原因?</p>
<p>照明?这是场景的代码。它是一个基本的 Xcode 游戏项目</p>
<pre><code>// create a new scene
SCNScene *scene = ;
// create and add a camera to the scene
SCNNode *cameraNode = ;
cameraNode.camera = ;
;
// place the camera
cameraNode.position = SCNVector3Make(0, 0, 100);
// create and add an ambient light to the scene
SCNNode *ambientLightNode = ;
ambientLightNode.light = ;
ambientLightNode.light.type = SCNLightTypeAmbient
ambientLightNode.light.color = ;
;
// retrieve the ship node
SCNNode *ship = ;
ship.geometry.firstMaterial.diffuse.contents = ;
ship.geometry.firstMaterial.specular.contents = ;
SCNVector3 vector = SCNVector3Make(.1, .1, .1);
;
//;
// animate the 3d object
]];
// retrieve the SCNView
SCNView *scnView = (SCNView *)self.view;
scnView.autoenablesDefaultLighting = true;
// set the scene to the view
scnView.scene = scene;
// allows the user to manipulate the camera
scnView.allowsCameraControl = YES;
// show statistics such as fps and timing information
scnView.showsStatistics = YES;
// configure the view
scnView.backgroundColor = ;
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>尝试在相机上设置 zFar 属性。其他可以尝试更改的相关属性是 xFov 和 yFov。</p></p>
<p style="font-size: 20px;">关于ios - 来自sketchup的场景包模型消失了,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/26686782/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/26686782/
</a>
</p>
页:
[1]