朱峰社區(qū)首頁(yè) 朱峰社區(qū)

搜索資源 注冊(cè)|登陸

等待

返回 展開(kāi)菜單
按功能 按軟件

Unity3D游戲制作教程

Unity3D游戲制作教程

包含5節(jié)視頻教程

本系列包含Unity3D介紹、Unity3D導(dǎo)出人物、Unity3D導(dǎo)出場(chǎng)景、Unity3D導(dǎo)出動(dòng)作、游戲測(cè)試最終完成一個(gè)簡(jiǎn)單的游戲。是一套非常完整的Unity3D游戲制作教程。

關(guān)閉

Unity組件:Line Renderer 線(xiàn)渲染器

關(guān)注:3374 留言:0 樓主:cl7260768 001 發(fā)帖時(shí)間:15年11月16日

cl7260768 001

普通會(huì)員

cl7260768 001

社區(qū)兄弟:4級(jí)

關(guān)注3450人

  • 性別

  • 年齡

    18

  • 積分

    133

  • 登陸

    1

  • 發(fā)帖

    3

間隔線(xiàn)

The Line Renderer takes an array of two or more points in 3D space and draws a straight line between each one. A single Line Renderer Component can thus be used to draw anything from a simple straight line, to a complex spiral. The line is always continuous; if you need to draw two or more completely separate lines, you should use multiple GameObjects, each with its own Line Renderer.

線(xiàn)渲染器(Line Renderer)有一個(gè)包含兩個(gè)或更多3D空間中點(diǎn)的數(shù)組并在每?jī)蓚(gè)點(diǎn)之間繪制平直的線(xiàn)。一個(gè)單獨(dú)的線(xiàn)渲染器(Line Renderer)組件因此可以用來(lái)繪制任何東西,從一條簡(jiǎn)單的平直線(xiàn)到一條復(fù)雜的螺旋線(xiàn)。這些線(xiàn)一直是連續(xù)的;如果你需要繪制兩條或更多完全間斷的線(xiàn),你需要使用多個(gè)游戲物體(GameObject),每一個(gè)都帶有它們自己的線(xiàn)渲染器(Line Renderer)。

The Line Renderer does not render one pixel thin lines. It renders billboard lines that have width and can be textured. It uses the same algorithm for line rendering as the Trail Renderer.

線(xiàn)渲染器(Line Renderer)并不渲染一個(gè)像素寬的線(xiàn)。它渲染有寬度并可以被賦予貼圖的告示板線(xiàn)。它使用與拖尾渲染器(TrailRenderer)相同的線(xiàn)渲染算法。


The Line Renderer Inspector 線(xiàn)渲染器檢視面板

Properties 屬性
  • Materials 材質(zhì)
    The first material from this list is used to render the lines.
    這個(gè)列表的第一個(gè)材質(zhì)用于渲染這些線(xiàn)
  • Positions 定位
    Array of Vector3 points to connect.
    用于連接Vector3類(lèi)型點(diǎn)的數(shù)組
  • Size 大小
    The number of segments in this line. 這條線(xiàn)中的段數(shù)
  • Parameters 參數(shù)
    List of parameters for each line: 每一條線(xiàn)的參數(shù)列表
  • StartWidth 開(kāi)始寬度
    Width at the first line position. 線(xiàn)的第一個(gè)位置處的寬度
  • EndWidth 結(jié)束寬度
    Width at the last line position. 線(xiàn)的最后一個(gè)位置的寬度
  • Start Color 開(kāi)始顏色
    Color at the first line position. 線(xiàn)的第一個(gè)位置的顏色
  • End Color 結(jié)束顏色
    Color at the last line position. 線(xiàn)的最后一個(gè)位置的顏色
  • Use World Space 使用世界坐標(biāo)
    If enabled, the object's position is ignored, and the lines are rendered around world origin.
    如果設(shè)置為允許,物體的位置被忽略,并且相對(duì)于世界原點(diǎn)來(lái)渲染線(xiàn)
Details 細(xì)節(jié)

To create a line renderer:

來(lái)創(chuàng)建一個(gè)線(xiàn)渲染器(Line Renderer):

  1. Choose GameObject->Create Empty
    選擇菜單GameObject->Create Empty
  2. Choose Component->Miscellaneous->Line Renderer
    選擇菜單Component->Miscellaneous->Line Renderer
  3. Drag a texture or Material on the Line Renderer. It looks best if you use a particle shader in the Material.
    拖拽一個(gè)貼圖或者材質(zhì)(Material)到線(xiàn)渲染器(Line Renderer)上。如果你在這個(gè)材質(zhì)上使用一個(gè)粒子著色器會(huì)看上去非常好
Hints 提示
  • Line Renderers are good to use for effects when you need to lay out all the vertices in one frame.
    當(dāng)你需要顯示出一幀內(nèi)所有的頂點(diǎn)時(shí)線(xiàn)渲染器(Line Renderer)用起來(lái)很好
  • The lines may seem to rotate as you move the Camera. This is intentional.
    當(dāng)你移動(dòng)攝像機(jī)(Camera)的時(shí)候這些線(xiàn)可能看上去在旋轉(zhuǎn)。這是故意如此的
  • The Line Renderer should be the only Renderer on a GameObject.
    線(xiàn)渲染器(Line Render)應(yīng)該是一個(gè)游戲物體(GameObject)上唯一的渲染器

贊0 踩0

未知用戶(hù)

2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號(hào)

回頂部

1.復(fù)制文本發(fā)給您的QQ好友或群、微信等;好友點(diǎn)擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點(diǎn)擊您的鏈接,您需要需刷新一下才行;同一個(gè)好友僅能點(diǎn)擊一次。
購(gòu)買(mǎi)VIP,觀看所有收費(fèi)教程。