Hi im trying to make this, i took pictures because its easier for me to explain it.
First image, line should go all the way to mouse position
Second image, line should point to mouse position, but it should go all the way till it touch or overlaps a solid. And so on on the next images.