turns out that 2D ray casting is significantly easier than 3D ray casting (it’s just getting the intersection between two line segments)
so yeah, I made 2D ray casting