2D navigation and pathfinding node.
Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. These are automatically collected from child [NavigationPolygonInstance] nodes.
Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface.
Returns the owner region RID for the point returned by [method get_closest_point].
Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the path is smoothed by merging path segments where possible.