After creating some Sci-Fi attacks like the Rainbow Lazer or the Ro-Cat-Paw Launcher we thought the next special attack should be something more RPG like. So this Blogpost is about how I created a cool chaining lightning strike.

The main idea behind the lightning is to have some line renderers between enemies and generate random line renderer points to get some movement into it. To get amount of points I callculate the distance from the lightning source to its target and split it into segments. After that i know how much points I need. To get the distance between our hero and the enemies I maintain a list of all alive enemies. Just add some randomness and you are almost done.

To make the line renderers look like lightnings I used a texture with a gradient. To make it even more better looking I added one more line renderer simulating a light.