1

I'm working with a polygon clipper (http://www.lighti.de/projects/polygon-clipper-for-java/) & libgdx delaunayTriangulator to generate a 2D navmesh.

Everything works well until i add an obstacle polygon completely inside the 'walkable' polygon.

Is this supposed to happen ?

https://i.stack.imgur.com/eBvOX.png

Ploppy
  • 14,810
  • 6
  • 41
  • 58

1 Answers1

1

Yes, this is supposed to happen. Clipper dont triangulate shapes with holes. For this purpose you can use poly2tri library (https://code.google.com/p/poly2tri/)

  • I too now work at 2dNavMesh, with Clipper and poly2tri. :) In LOVE2D (Lua), see on forum: https://love2d.org/forums/viewtopic.php?f=3&t=81155 – AntonioModer Oct 26 '15 at 03:33