Beam Weapon help

So i’ve looked at the other “Beam Weapon” threads and whatnot and i don’t think they’re very accurate to my situation, i am trying to do this in Unity: http://www.youtube.com/watch?v=LTB4_SDJkN4

Essentially i’m trying to Anchor Point A of the plane to the Emitter and slowly draw the plane to the direction of the target and finally either hit the target or anchor it.

Also this would have to be a JS Compatible solution.

I think sometime last month I answered a similar thread asking about laser weapons. I’ll give you the same answer. Simplest way, is use a LineRenderer. In your case with the effect you want to achieve:

  1. Create a line renderer with 2 vertices
  2. Set verts 0 and 1 to the position of your turret/cannon
  3. Animate (Lerp or Tween, your choice) the position of vertex 0 to the target
  4. Hold however long you want it to last
  5. Animate the position of vertex 1 to the same position

Should get you what you want.

I’m not very fluent in animations… can i do this with Unity’s built-in system?

As he said, use something like lerp.
http://docs.unity3d.com/Documentation/ScriptReference/Vector3.Lerp.html