Navigation2D

    Category: Core

    2D navigation and pathfinding node.

    • get_closest_point ( Vector2 to_point )

    Returns the navigation point closest to the point given. Points are in local coordinate space.


    Returns the owner of the which contains the navigation point closest to the point given. This is usually a NavigationPolygonInstance. For polygons added via , returns the owner that was given (or if the parameter was omitted).



    Adds a NavigationPolygon. Returns an ID for use with or navpoly_set_transform. If given, a is applied to the polygon. The optional is used as return value for get_closest_point_owner.


    Removes the with the given ID.


    • void navpoly_set_transform ( int id, xform )