Search Unity

Cool Glowing thing

Discussion in 'Made With Unity' started by forestjohnson, May 12, 2006.

  1. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    I was messing around making some stuff for putting in a shooter I might make in the future and I came across a really cool way to do laser type effects.

    www.yoggy.bluegillweb.com/Files/GlowThing/player.html

    I use a single flat poly with an additive shader that is rotated and scaled to create the illusion of a 3D glowing object.

    If anyone wants the script I will try to clean it up a bit and put it on the wiki. right now it is very very messy ;)
     
  2. greenland

    greenland

    Joined:
    Oct 22, 2005
    Posts:
    205
    Is it just a type of billboard shape?
     
  3. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Yeah basicly.
     
  4. Rhuantavan

    Rhuantavan

    Joined:
    Feb 23, 2006
    Posts:
    53
    I'd like to take a look at it :)
     
  5. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    I would also be very interested in seeing how you scripted this! It looks great!
     
  6. Lallander

    Lallander

    Joined:
    Apr 23, 2006
    Posts:
    429
    I also would like to see this.
     
  7. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
  8. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Neat.

    You might want to use:
    Code (csharp):
    1.  
    2. target = Camera.main.transform;
    3.  
    instead of:
    Code (csharp):
    1.  
    2. target = GameObject.Find("Main Camera").transform;
    3.  
    Because it is more reliable (If someone renames the camera).
    And faster since Unity doesn't have to search all game objects by name.
     
  9. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    For some reason I thought that other method wasn't working but bet it was an error I made somewhere else in the beginning.

    I will update the script on the wiki with that.
     
  10. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Is this project still around?
    Cheers
    AC
     
  11. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    I have since discovered a vastly easier (and faster) way to do it. It is amazingly simple. Just make new game object (or use whatever bullet you are using and strip all renderers from it)

    Then make a 2 poly plane with a radial gradient image on it (circle) with additive blending, make it a child of your bullet, and add a very simple look at camera script to it.

    private var c : Transform;
    c = Camera.main.transform;

    function Update()
    {
    transform.LookAt(c);
    }

    now simply drag the z scale of the parent as far as you want for the desired length.
     
  12. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Thanks Forest!
    AC