diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/navigation_link_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/navigation_region_2d.cpp | 2 | ||||
-rw-r--r-- | scene/2d/tile_map.cpp | 1 | ||||
-rw-r--r-- | scene/3d/navigation_link_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation_region_3d.cpp | 2 |
5 files changed, 9 insertions, 0 deletions
diff --git a/scene/2d/navigation_link_2d.cpp b/scene/2d/navigation_link_2d.cpp index 3f7e10eaea..d639e1cc89 100644 --- a/scene/2d/navigation_link_2d.cpp +++ b/scene/2d/navigation_link_2d.cpp @@ -279,6 +279,8 @@ PackedStringArray NavigationLink2D::get_configuration_warnings() const { NavigationLink2D::NavigationLink2D() { link = NavigationServer2D::get_singleton()->link_create(); + NavigationServer2D::get_singleton()->link_set_owner_id(link, get_instance_id()); + set_notify_transform(true); } diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 13d371042b..7bf3eec79b 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -634,7 +634,9 @@ void NavigationRegion2D::_bind_methods() { NavigationRegion2D::NavigationRegion2D() { set_notify_transform(true); + region = NavigationServer2D::get_singleton()->region_create(); + NavigationServer2D::get_singleton()->region_set_owner_id(region, get_instance_id()); NavigationServer2D::get_singleton()->region_set_enter_cost(region, get_enter_cost()); NavigationServer2D::get_singleton()->region_set_travel_cost(region, get_travel_cost()); diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index ced77b26ee..8b27dbe3db 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1735,6 +1735,7 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList<TileMapQuadrant>::List tile_transform.set_origin(map_to_local(E_cell)); RID region = NavigationServer2D::get_singleton()->region_create(); + NavigationServer2D::get_singleton()->region_set_owner_id(region, get_instance_id()); NavigationServer2D::get_singleton()->region_set_map(region, get_world_2d()->get_navigation_map()); NavigationServer2D::get_singleton()->region_set_transform(region, tilemap_xform * tile_transform); NavigationServer2D::get_singleton()->region_set_navpoly(region, navpoly); diff --git a/scene/3d/navigation_link_3d.cpp b/scene/3d/navigation_link_3d.cpp index 78fe4754ea..bee7c7f39b 100644 --- a/scene/3d/navigation_link_3d.cpp +++ b/scene/3d/navigation_link_3d.cpp @@ -221,6 +221,8 @@ void NavigationLink3D::_notification(int p_what) { NavigationLink3D::NavigationLink3D() { link = NavigationServer3D::get_singleton()->link_create(); + NavigationServer3D::get_singleton()->link_set_owner_id(link, get_instance_id()); + set_notify_transform(true); } diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 06182d921c..bd96c55512 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -339,7 +339,9 @@ void NavigationRegion3D::_navigation_map_changed(RID p_map) { NavigationRegion3D::NavigationRegion3D() { set_notify_transform(true); + region = NavigationServer3D::get_singleton()->region_create(); + NavigationServer3D::get_singleton()->region_set_owner_id(region, get_instance_id()); NavigationServer3D::get_singleton()->region_set_enter_cost(region, get_enter_cost()); NavigationServer3D::get_singleton()->region_set_travel_cost(region, get_travel_cost()); |