So Basically the title of the question is what im asking
so basically without using any parts
I want to manually have the raycast stop if it leaves the region
the only Idea I have right now is calculating the magnitude distance direction and making it so that it ends before it leaves the region3