Trying to make a line with only one point moving have continuous collision detection

I have a line in my game that when created has one point that stays on my player while the other point moves by updating its position. The problem is that sometimes it does not collide because it teleports through the walls. ive trying using the rigidbody to move it, but because only one point is moving I have found it to be extremely complicated. Is there a way to make it continuously detect collisions without using the rigidbody for movement?

Can you add a RigidBody and a small collider to a new object that you place on the 2nd point, let it move and collide, then set the position of the 2nd point to that of the RigidBody each Update?

That way you can be sure the point is not in a wall, however if the line is long things may come between the two points. If that’s the case you need to have a collider that covers both points of the line and either scale it or modify its points when moving 2nd point.

I’m not sure how well collisions work for colliders that change size/shape.
I have used it with a door (BoxCollider2D) that when it opens and closes does not move, instead it scales one axis so the object grows/shrinks.