How to combine two NavigationPolygons by code? (boolean operations)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By genete
:warning: Old Version Published before Godot 3 was released.

I have a labyrinth where randomly there are some obstacles that appears in the middle of the path and prevent to crossed it to the enemies and the player.

I’m using Navigation2D and created in the editor NavigationPolygon that conforms the labyrinth. But it is possible to add by code a new polygon and integrate it into the current map as one obstacle (it would remove a section of path to emulate the obstacle).

When using the editor, I can create holes in the map by adding a new polygon that is completely inside other polygon. There isn’t a way to make a subtract operation between one polygon and other so I can modify the map easily?

Would be implemented in the future?

:bust_in_silhouette: Reply From: TotCac

Maybe we have a chance to see it in 2.1

Thanks for the reply. It would be great that something in this matter come with 2.1

genete | 2016-06-15 06:42