我如何旋转衬套网眼以使其显得平坦
我正在使用Unity的自定义工具,使我能够以与城市天际线相似的方式绘制道路。我在平面上产生了2点,并在它们之间绘制,在端点上添加点,以在每个球体之间创建一个顶点和线条链。
我的问题是,将材料放在衬里者上时,我会得到面向错误的方向的材料,并且由于您无法旋转LR,我似乎无法旋转网格。由于我将LR材料设置为我的道路纹理,所以我是否以错误的方式进行操作,所以不确定是否有更好的方法?我附上了当前旋转和LR设置的图像。我基本上需要道路从飞机上从该位置到平坦。忽略任何其他领域。
I'm working on a custom tool in Unity that allows me to draw roads in a similar way as City Skylines. I spawn 2 points on a plane and draw between them adding points on the endpoint to create a chain of vertices and lines drawn between each sphere.
My problem is when putting the material on the linerenderer I get the material facing the wrong direction and I cant seem to be able to rotate mesh since you can't rotate LR. Am I going about this the wrong way since I have the LR material set to my Road texture so not sure if theres a better way to do it? I attached the image of current rotation and my LR settings.I basically need the road to go from that position to flat on the plane. Ignore any other spheres.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
linerenderer面向Z轴,因此将其粘在路上:
旋转linerenderer的z轴向上。
如果您有世界位置(x,y,z),则应将其设置为linerenderer的位置(x,z,y)。
LineRenderer is facing Z axis, so to stick it on the road:
Rotate LineRenderer's Z axis up.
If you have a world position (x, y, z), you should set it as (x, z, y) in LineRenderer's positions.