3D line generation with collider

Hi,
I want to build a 3d line with collider . The player will move on x-direction when it comes to end of screen , new linew ll be generated randomly.

Any suggestion ?

ps: i tried Vectrosity Plugin. But only 2d lines have colliders . I need 3d lines.

For each line you place a new collider at the position and make its size of the length and a define height.

  Draw your line
  direction = end - start;
  length = direction.magnitude;
  BoxCollider bc = line.AddComponent<BoxCollider>();
  Vector3 s = bd.size;
  s.x = length;
  bc.size = size;

this above is surely not working as it is, you need to make it proper but this should get you on the path of success.