|Topic was automatically imported from the old Question2Answer platform.
Hi everyone, so I am working on a game that requires modification of the tilemap in-game, indirectly. I’m placing StaticBodies into the screen (barricades and other items) and I need my AIs to be able to pathfind around them. I’m using a Navigation2D instance, with the TileMap and the StaticBodies added as children to that, and I’ve added NavigationPolygonInstances to the tiles in the tilemap using the new (Godot 3.1) TileSet editor. Right now, when you place a StaticBody into the scene (snapped to the map’s grid, but not in the map), I replace the tile under it with a version of the same tile that doesn’t have a NavigationPolygonInstance on it. This means that I have to have duplicate versions of every single floor tile, though, and it’s really not great. Is there any way to dynamically access the TileMap’s navigation mesh to modify it at runtime?
Thanks in advance for your help,
I have the exact same problem, if anyone has a solution I’d be happy to hear it !
Nevaran | 2019-12-05 14:03