can someone give me idea how can i make intersection only first box when the line is stretched to mouse cursor? Im trying to make something like "raycasting" but don't know how to stop the line.
https://i.stack.imgur.com/0CzpW.png
I tried line-line intersection but don't know how to find proper wall of the box