hit - will store the last value anywhere. while something would hit.
no physics in unity of the concept - "faced with the emptiness".
so you or zanoletti before each test (although I do not remember if it works) or a single global Collider/trigger Ala "the border of peace" to do)
well generally the logic of physics involves the reaction to "something there". the collision, intersection, etc.)
try to write
what skalitsa/moves/what you had it doing there always, and stops if beam crashed into something.