Physical line

Hello, how do I create a physical line to track intersections with objects?

I teach the Enemy to bypass obstacles, do you have recommendations? Maybe there is already something ready somewhere.
Screenshot_1

Recently returned to this game. It’s decided.


Screenshot_7