so what I need is to calculate the sum of players' Field of view. Put simple, In a 2d space, I want to check how much they cover (in degrees).
So here are a couple of use cases to explain by example: Let's say I have two players (but can be scalable to more) with a FoV of 90°:
- If they are opposite of each other, the result should be 180°.
- If they are looking in the exact same direction, the result should be 90°.
- If they are at 45° of each other, the result should be 135°.
As data, I have the List of players (list), the FoV (degrees), the Position of the players [x, y], the direction they are facing (degrees). I can't think of anything else the can be of use. (If there is some extra data that would help I will check if it is something that can be created).
BTW, I am using a custom engine, I think that is a quite important info. :)
Thank you in advance for anyone willing to help.