
扁平的网格
现在出现了一个漂亮的扁平网格。但是它不应该显示线性函数吗?是的,但是现在只用于显示沿着Z轴的第一行点。如果你选了一个不同的函数,只有这些点会改变,其他的将保持不变。这是因为Update函数目前只遍历分辨率点,然而它应该是遍历所有点的。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
void Update () {
if (currentResolution != resolution || points == null ) {
CreatePoints();
}
FunctionDelegate f = functionDelegates[(int) function ];
for (int i = 0; i < points.Length; i++) {
Vector3 p = points[i].position;
p.y = f(p.x);
points[i].position = p;
Color c = points[i].color;
c.g = p.y;
points[i].color = c;
}
particleSystem.SetParticles(points, points.Length);
}
|


建议使用电驴(eMule)下载分享的资源。
说明:本教程来源互联网或网友分享或出版商宣传分享,仅为学习研究或媒体推广,wanshiok.com不保证资料的完整性。
6/9 首页 上一页 4 5 6 7 8 9 下一页 尾页 |