How can I locate empty space next to polygon regions?
Posted
by
Stephen
on Game Development
See other posts from Game Development
or by Stephen
Published on 2012-07-08T22:21:47Z
Indexed on
2012/07/09
3:23 UTC
Read the original article
Hit count: 373
Let's say I have the following area in a top-down map:
The circle is the player, the black square is an obstacle, and the grey polygons with red borders are walk-able areas that will be used as a navigation mesh for enemies. Obstacles and grey polygons are always convex.
The grey regions were defined using an algorithm when the world was generated at runtime.
Notice the little white column. I need to figure out where any empty space like this is, if at all, after the algorithm builds the grey regions, so that I can fill the space with another region.
Basically what I'm hoping for is an algorithm that can detect empty space next to a polygon.
© Game Development or respective owner