Navigation2D
Inherits: Node2D < CanvasItem < Node < Object 2D navigation and pathfinding node.
Description
Deprecated. Navigation2D node and get_simple_path are deprecated and will be removed in a future version. Use Navigation2DServer.map_get_path instead.
NavigationPolygon resources. By default, these are automatically collected from child NavigationPolygonInstance nodes.
Tutorials
- 2D Navigation Demo
Properties
Methods
Property Descriptions
- float cell_size The XY plane cell size to use for fields.
- float edge_connection_margin This value is used to detect the near edges to connect compatible regions.
- int navigation_layers
get_simple_path path query.
Method Descriptions
- Vector2 get_closest_point ( Vector2 to_point ) const Returns the navigation point closest to the point given. Points are in local coordinate space.
- RID get_closest_point_owner ( Vector2 to_point ) const NavigationPolygon which contains the navigation point closest to the point given. This is usually a NavigationPolygonInstance.
- RID get_rid ( ) const RID.
- PoolVector2Array get_simple_path ( Vector2 start, Vector2 end, bool optimize=true ) const
Deprecated.
Navigation2Dnode and get_simple_path are deprecated and will be removed in a future version. Use Navigation2DServer.map_get_path instead.optimizeistrue(the default), the path is smoothed by merging path segments where possible.
