Hi and hello. I was looking for a forum with this kind of knowhow, so let's get started.

I have a circle segment with a given angle, direction, and radius (it's like a 2d field of view of a character). And a lot of squares. How can I check which squares are visible?

Here's an example:


I've figured out how to do it with a full circle (as seen on the picture), but I can't figure out how to do it for a limited segment.

Any solutions?

Thanks for help!

Ps. To be specific: