So, I’m trying to make an energy beam, using a Line Renderer, that’s fired every time the player presses “mouse 0”. However, I need to know how can I spawn the line renderer every time the player presses the button, and also, set it’s positions (element 0 and 1) in the player ship and the target object, using Unityscript…
weapon1 is a class I created to hold the characteristics of beam weapons, beam is a var that holds the GameObject of the beam that’s currently being fired, isBeam is a boolean var that’s used to check if the beam is being fired and target is the current target of the ship.