your 'velocity' vector value your passing is an ABSOLUTE direction/velocity vector.
I don't see you doing any direction vector calculation from vert1 to vert 2 ( im assuming you want the beam to move from vert1 to vert 2 direction here) and storing that into 'velocity'