Hi!
I am trying to implement ray casting 2d visibility in java. Following this guide: https://www.redblobgames.com/articles/visibility/
I have gotten to the point where i am able to calculate the angles where walls begin or end and cast a ray from the center of my mouse point. But i am not able to draw proper traingles from my ray-segment list. Do you guyz have any any idea how i connect the points (x1,y1,x2,y2) to make proper triangles? Please take a look at the picture below.
Image 1:
Image 2:
Thanks in advance