0

I want to show a transparent building in our project. I did that by setting the material of the mesh to be "transparent/diffuse". However, there exists some visibility problem of the mesh of the building. At some position, I can only see two or three sides of the cuboid(the transparent block, i.e the building). If I adjust my character position, I can see the whole cuboid. I googled the similar question online, someone mentioned about the frustum view of the camera. It seems like character has to be inside the frustum view of the camera, then user can see the whole mesh of the cuboid.

Can anyone give me some suggestions? I feel like it might be something about the way of how I build my mesh for the building, but at some position, I can see the whole cuboid.

4

1 回答 1

0

我已经解决了这个问题。这与构建网格的方式有关。基本上,对于长方体,我以这种方式重建了网格:

triangles[0]=topleft;
triangles[1]=topright;
triangles[2]=bottomright;
triangles[3]=bottomright;
triangles[4]=bottomleft;
triangles[5]=topleft;

注意:这只是正面,其他侧面应该以相同的方式构建。此外,为了在用户进入块时显示网格,您必须按照前面的方式构建块的内部区域。

于 2013-10-25T17:11:43.113 回答