Topic was automatically imported from the old Question2Answer platform.
Asked By
knob
Hello,
I’ve setup a TileMap with a navigation layer and a NavigationAgent2D to move on click. I’d like to add some dimensions to my nav agent so it doesn’t spill outside tiles that are marked as fully walkable. Essentially, I’m looking for something like the agent_radius property of the NavigationMesh class, but in the context of a TileMap nav layer.
If you want to do it procedural you can use Geometry2D functions to merge / shink a navigation polygon and use it in a NavigationRegion2D / NavigationPolygonInstance instead of using the TileMap baked navigation.
But first you need to merge all those unwieldy single TileMap tiles into a more managable navigation polygon that represents a larger part your traversable world. Only than can you shrink it to agent size with the Geometry2D functions.