Creating a squared/triangular beam particle system?

Hey guys, this could be a silly question but I have no clue how to achieve this. I have two points that i can set into the landscape on button click. Then I want a rectangular or a triangular shape appear between them. The beam source and target point should be on the top corners of the rectangle/triangle. For clarification here is a pic: Imgur: The magic of the Internet

I dont know if particle systems is here the best way anyways, maybe this could be solved also with a static mesh? But then I dont know how to get the corners of the mesh and stretch it along between the points…

Does anyone has some ideas?

Hey there, if i understand correctly what you asked, you can use a plane mesh (100x100x0 with the pivot point on the top left corner) and set its location to point 1, then calculate the direction and distance from point 1 to point 2 and set the rotation to the direction and the scale to the distance divided by 100 so it matches with point 2. Then you can apply different materials to the plane.