Unity lightning Contest

I participate in the Unity lightning contest, with the hope to win a Unity pro licence.

You can see all entries on the unity contest page.

You can even try my beauuutifullll Unity lightning demo:

Unity lightning contest entry
Unity lightning contest entry

I only work on it 1 big day and a half. I should have worked a little more to  ensure me a victory but my other job eat me all my time.

My Unity project will be delivered for free at the end of the contest !
I will post a link of the Unity package with all the source code in this blog for everyone who want to download it !

The code is clean, and commented. I made a framework to easily draw multiple line. So you will be able to use it for other projects if you want, or take it as an example.

 

8 responses to “Unity lightning Contest”

  1. peter Avatar
    peter

    Good job! I use it in my project.

    Thunder.cs Line 291 gives you a runtime null reference if you don have camera.main.
    I replaced it with Vector3.zero. Can’t tell if it makes a difference.

    1. WildFactor Avatar
      WildFactor

      Without the code near my eyes, I would say: I think that I need the camera to make a billboard effect (Polygone always face the cam) . It will still look good with Vector3.zero if you don’t look too close to the lighning.
      I wasn’t aware that camera.main can be null. When the camera.main is null ?
      And what is your project (to feed my curiousity)?

  2. peter Avatar
    peter

    i only have a player camera. i can replace the line with my camera. star wars. muha

  3. WildFactor Avatar
    WildFactor

    keep me up-to-date of your project.
    I’m very curious.

    cheers
    Alexandre

  4. james Avatar
    james

    Wow. This effect seems great!

    I want to use it.

    But I can’t find download link.

    Could you share it? If do, It will be very helpful for me.

    1. WildFactor Avatar
      WildFactor

      The contest website is down, so I upload it on my own website. You can get it here:
      http://www.wildfactor.net/Upload/Thunder.unitypackage

  5. Dave Avatar
    Dave

    Nice job on this one, it looks great. Is there a way to keep the lightning anchored to the parent object? I’ve found that if the parent object moves, the lightning seems to get separated from the parent object. I tried setting the start and end points in an Update() function, but that didn’t work.

    1. WildFactor Avatar
      WildFactor

      Hi Dave.
      I’m not sure I understand you, but:
      if you want to move lighting you just have to change the position of start point game Object and end point game Object.

      For optimisation reason the lighting gameobject shouldn’t move (avoid matrix recalculation) and I don’t think there is a strong reason to want to do it (unless you want to make your object hierarchie more “tidy”).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


     

Sign up to be kept up-to-date with news and offers, 100% spam free!!