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

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. 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 Can’t tell if it makes a difference.

    • 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 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. 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.

  3. 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.

    • 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

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