Draw a line between two points with a collider

Hi guys,

is there any way for Unity to draw a line between two points (similiar to lineRenderer) on the fly, but have the ability to have a collider on the line?

I'm currently using a Line Renderer, which works fine for drawing the line, but i cant find any way to involve that line render for collisions or unity physics.

Can anyone offer any advice?

Thanks in advance.

Kyhil.

You could use a capsule collider with a small radius.

To align it with two points, it needs to be positioned between the two points and rotated so the endpoints touch the points. The height of the capsule collider should be equal to the distance between the two points.