I want to produce a polygon inside an arbitrary polygon. The inner polygon shall be distanced from the outer polygon with a fixed distance, d. I will use the inner polygon as a border for player movements, and the player radius will be 2 * d.
If the outer polygon contains sections with width less than 2 * d the inner polygon will not fill that space, or any space on the other side of that passage.
Keeping the distance to the outer polygon means that the inner polygon will form circles, by a number of segments, around sharp vertexes.
How do I generate the red polygon?