I am working on a simple 2D soccer game, while passing the ball between my players I would like to check if any of the enemy players can intercept the ball, what I would like to do is calculate a list of coordinates between my players a corridor so to speak and then check if any enemy players are in this region,
-------------------------- S S --------------------------
It is easy to calculate the area between Ss when they lie like this, but how do I calculate the region when they are not aligned,
/S / / / / / / / / / / / / S/
EDIT: When I mean area, I want the list of coordinates in that region so that I can check those coordinates against players coordinates, not the magnitude of the area.