Chaos Project

Game Development => General Discussion => Topic started by: MarkHest on January 13, 2016, 03:10:20 pm

Title: (Unity C#) Help with beam attack
Post by: MarkHest on January 13, 2016, 03:10:20 pm
Hi!  :haha: I need some help from an experienced Unity programmer that can help me make this happen and make it look awesome! ;)
So I decided one of the bosses in my sideproject I'm working on is going to have a giant Beam attack that shoots from the body of the boss and follows the player with small delay in movement.
The beam is going to scale from the boss all the way to the ground it touches. Once a new ground level(height) is met the beam will scale accordingly.

Here's a gif of an animation I made to describe more precise what it is I want to do:
This actually took me like 30 Minutes to make...: ShowHide
(https://dl.dropboxusercontent.com/u/29306744/LaserBeamDemonstration.gif)


Here is also a video of a game called Wings of Vi. Skip to 11:22 to see what kind of beam I want to create with better graphics:
Video (https://www.youtube.com/watch?v=xpr-WUf513w)

How can I scale the beam while one end of the object(the starting point, AKA the boss) is a set vector?
I'm not sure how to do this. Is the beam just an animation-object with a collider or is there a lot of programming involved? There are probably multiple ways of doing this. Show me the way you think is best :)

EDIT: I'm not asking to get the full code with files and animations and everything :P. I just want some guidance on what would be the best way to get this done. (Feel free to write code if you want though.)