Line Renderer Component: Difference between revisions
Jump to navigation
Jump to search
(Initial content) |
mNo edit summary |
||
(7 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
The Line Renderer component can | The Line Renderer is a [[:Category:Rendering Components|rendering component]] that can create a 3D line through the scene. It is primarily used for adding interesting visual effects and detail to a mod. | ||
== Component Settings == | == Component Settings == | ||
[[File:LineRendererWithInspector.png|thumb|800px|right|An example of a line renderer component and how it appears in the [[Scene View]]. The custom material uses the ''Particle Alpha Blend'' shader]] | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 52: | Line 54: | ||
| style="padding-left: 2em;" | ''Shadows Only'' || The line will not be visible, only its shadow will. | | style="padding-left: 2em;" | ''Shadows Only'' || The line will not be visible, only its shadow will. | ||
|- | |- | ||
| '''Receive Shadows''' || Should the line receive shadows from other objects | | '''Receive Shadows''' || Should the line receive shadows from other shadow-casting objects. | ||
|} | |} | ||
== Example == | == Example Usage == | ||
[[File:LineRendererExample.png|thumb|right|300px|Here line renderers have been used to make moving lasers for the player to avoid.]] | |||
Possible uses for line renderers include: | Possible uses for line renderers include: | ||
* A rope | * A rope | ||
Line 63: | Line 66: | ||
* Rainbows | * Rainbows | ||
* A path (A winding carpet or a bridge made of energy/magic/light) | * A path (A winding carpet or a bridge made of energy/magic/light) | ||
[[Category:Rendering Components]] | |||
[[Category:Components]] |
Latest revision as of 01:05, 16 December 2022
The Line Renderer is a rendering component that can create a 3D line through the scene. It is primarily used for adding interesting visual effects and detail to a mod.
Component Settings
Property | Description |
---|---|
Positions | An ordered list of positions. The line is constructed by connecting these points together. |
Loop | Connects the last position back to the first. |
Use World Space | Makes the positions relative to the world origin, rather than this gameobject's transform position. |
Start Width | The width of the line at the first position. |
End Width | The width of the line at the last position. |
Corner Vertices | How smooth the corners in the line should be. Higher numbers lead to smoother corners. |
End Vertices | How smooth the ends of the line should be. Higher numbers lead to smoother ends. |
Start Color | The color of the line at the start position. Some materials don't support setting a color. |
End Color | The color of the line at the last position. Some materials don't support setting a color. |
Alignment | Determines if this light source will cast shadows and whether they will have a soft or hard edge. |
View | The line will always try to face the camera. |
Transform Z | The line will always try to face the +Z axis of the gameobject's transform. |
Texture Mode | How the texture of this material should be drawn onto the line. Some materials don't support textures. |
Stretch | Stretches the texture along the length of the line. The texture doesn't repeat. |
Tile | Tiles the texture along the length of the line. The tiling is controlled by the texture tiling value of the material. Some materials don't support texture tiling. |
Distribute Per Segment | Stretches the texture once along the length of the line. The texture will be stretched equally between each point, rather than evenly across the entire line. |
Repeat Per Segment | Stretches the texture between each position on the line, repeating along the length of the line. |
Materials | A list of materials used by the line. |
Cast Shadows | Should the line cast shadows. |
Off | The line will not cast any shadows. |
On | The line will cast shadows from the visible side. |
Two Sided | The line will cast shadows from both sides. |
Shadows Only | The line will not be visible, only its shadow will. |
Receive Shadows | Should the line receive shadows from other shadow-casting objects. |
Example Usage
Possible uses for line renderers include:
- A rope
- Power lines
- Lightning bolts
- Lasers
- Rainbows
- A path (A winding carpet or a bridge made of energy/magic/light)