Search Unity

2D Line Renderer material issues

Discussion in '2D' started by directusgames, May 19, 2015.

  1. directusgames

    directusgames

    Joined:
    May 8, 2015
    Posts:
    14
    Hi guys!

    I'm trying to create a laser beam effect in a top-down 2D game. Although there's a few ways of doing this, I've deicded to go with the Line Renderer approach. Functionally, I have it working fine, however I'm having significant difficulty understanding how to use textures/materials/shaders to achieve the visual effect I want.

    I've attempted a fair amount of research on the subject, but most of it applies to 3D and I have trouble wrapping my head around how it applies to a 2D environment.

    This is a rough image of the effect I'm trying to achieve:
    laserbeam.png

    And these are some of the textures I've been attempting to use:
    lasertex1.png lasertext3.png lasertex4.png

    I've tried applying the textures to materials with different shaders but i'm not really getting any results other than a line with an odd colour or sometimes no colour. Can anyone give me a basic rundown on what I should be doing?

    I don't need anyone to actually design me a texture, but just an explanation on how to correctly apply them.

    Thanks!
     
  2. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    Get better help from the graphics forums, you will. :)