Add NavigationServer2D/3D API functions to find missing RID info
Utility functions for NavigationServer2D/3D to find missing RID information when working with Server API directly. e.g. from map to regions and agents, from agent or region to map, from region to map and agents and so on ....
Requirement to work with NavigationServer API exklusive without SceneTree nodes and when juggling agents and regions between multiple navigation maps.
(cherry picked from commit 371054e3e5)
This commit is contained in:
@ -82,11 +82,15 @@ public:
|
||||
virtual Vector2 map_get_closest_point(RID p_map, const Vector2 &p_point) const;
|
||||
virtual RID map_get_closest_point_owner(RID p_map, const Vector2 &p_point) const;
|
||||
|
||||
virtual Array map_get_regions(RID p_map) const;
|
||||
virtual Array map_get_agents(RID p_map) const;
|
||||
|
||||
/// Creates a new region.
|
||||
virtual RID region_create() const;
|
||||
|
||||
/// Set the map of this region.
|
||||
virtual void region_set_map(RID p_region, RID p_map) const;
|
||||
virtual RID region_get_map(RID p_region) const;
|
||||
|
||||
/// Set the global transformation of this region.
|
||||
virtual void region_set_transform(RID p_region, Transform2D p_transform) const;
|
||||
@ -99,6 +103,7 @@ public:
|
||||
|
||||
/// Put the agent in the map.
|
||||
virtual void agent_set_map(RID p_agent, RID p_map) const;
|
||||
virtual RID agent_get_map(RID p_agent) const;
|
||||
|
||||
/// The maximum distance (center point to
|
||||
/// center point) to other agents this agent
|
||||
|
||||
Reference in New Issue
Block a user