Commit Graph

291 Commits (fe84b84b51df1ff6db658f521d1040aa563cedd0)

Author SHA1 Message Date
Ershn c3ee32f106 Use a heap to store traversable polygons for pathfinding 2024-09-01 11:24:14 +07:00
A Thousand Ships e33fdb4296
Use `MutexLock` in more places 2024-08-29 14:12:59 +07:00
Pawel Lampe c3f1bfd5cb Extract navigation-related defaults to separate header 2024-08-27 20:12:10 +07:00
Rémi Verschelde 0274508647
Merge pull request #93498 from smix8/connection_relocation
Move NavRegion connections to NavMap
2024-08-19 16:05:05 +07:00
Rémi Verschelde da57bab169
Merge pull request #92560 from smix8/navmesh2d_bake_partition
Add triangulation partition option to 2D navigation mesh baking
2024-08-19 16:04:49 +07:00
Rémi Verschelde dbf4be308c
Merge pull request #93583 from smix8/obstacle_monitor
Add navigation obstacles to performance monitor stats
2024-08-16 23:45:10 +07:00
kobewi 065dd099dd Remove empty bind_methods() 2024-08-15 08:24:32 +07:00
smix8 110b2dc61a Add triangulation partition option to 2D navigation mesh baking
Adds triangulation partition option to 2D navigation mesh baking as an alternative to the existing convex partition option.
2024-08-05 00:08:46 +07:00
Artem b8fc6b4979
NavigationServer3D.map_get_closest_point_to_segment - add an additional shortest distance check
For a case when shortest distance is between some point located on a face's
edge and some point located on a line segment.
2024-06-29 19:50:10 +07:00
smix8 f9876d3a88 Add navigation obstacles to performance monitor stats
Adds navigation obstacle count to navigation performance monitor.
2024-06-25 05:17:27 +07:00
smix8 83bd8fa396 Move NavRegion connections to NavMap
Moves bookkeeping for connections from region to map where connections are actually made.
2024-06-23 14:49:35 +07:00
smix8 40fc299aa3 Remove unused navigation polygon properties
Removes unused navigation polygon properties, a leftover from the old Godot 3 days that used polygon center to polygon center distance for (rather inaccurate) pathfinding cost calculation.
2024-06-22 21:55:48 +07:00
smix8 eba3acadac Fix thread-use causing navigation polygon data corruption
Fixes navigation polygon  data corruption caused by thread-use that changed vertices or polygons while the navigation polygon was processed, e.g. by server region sync, navmesh baking or user thread updates.
2024-06-21 12:58:03 +07:00
Rémi Verschelde 04a530f91f
Merge pull request #93407 from smix8/lock_this_geometry_up
Fix thread-use causing navigation source geometry data corruption
2024-06-21 10:14:38 +07:00
smix8 fd727ab994 Fix thread use causing navigation mesh data corruption
Fixes navigation mesh data corruption caused by thread use that changed vertices or polygons while the navigation mesh was processed, e.g. by server sync or baking.
2024-06-21 09:39:16 +07:00
smix8 d4722b9e1f Fix thread-use causing navigation source geometry data corruption
Fixes navigation source geometry data corruption caused by thread-use that changed vertices or indices while the source geometry data was used in a parsing process or read from by the navmesh baking.
2024-06-21 08:06:14 +07:00
Artem 4ed747e255 Fixed closest edge and face check in NavigationServer3D.map_get_closest_point_to_segment 2024-06-17 15:34:46 +07:00
Per Melin 9b191f669c Fix NavigationServer3D.get_closest_point_to_segment() with use_collision 2024-06-07 14:24:39 +07:00
Gilles Roudière 1a380db62a Fix crash when baking TileMap navigation 2024-05-27 10:46:54 +07:00
smix8 4128c7b311 Remove duplicated vertices after 3D NavigationMesh bake
Removes duplicated vertices that may exist on shared polygon corners after a ReCast navigation mesh bake.
2024-05-21 14:18:32 +07:00
A Thousand Ships ee79386f7b
[Scene] Add SceneStringNames::pressed 2024-05-14 15:51:28 +07:00
A Thousand Ships 86de59d60a
[Core] Add `LocalVector::has` for convenience 2024-05-06 18:03:37 +07:00
Gilles Roudière 23b9a9f2de Fix TileMapLayer navmesh baking 2024-05-02 18:06:23 +07:00
Aaron Franke 1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 +07:00
smix8 6a4d8d4b5c Change 2D navigation mesh baking to use floating point coordinates
Replaces internal uses of Clipper2 integer structs to their floating point equivalents.
2024-04-23 10:28:43 +07:00
smix8 58593d1bb7 Add navigation source geometry parser callbacks
Adds navigation source geometry parser callbacks so that externals can hook their own geometry into the navigation mesh baking process.
2024-04-19 12:10:57 +07:00
Aaron Franke 77e35cf781
Move NavigationMeshSourceGeometryData(2D/3D) to the 2D/3D subfolders 2024-04-15 18:40:43 +07:00
smix8 8a0f1f1995 Use fmod for navigation mesh border size warning
Uses fmod for checking that navigation mesh border size matches the cell size as a multiple of cell size is also valid.
2024-04-13 03:39:53 +07:00
Rémi Verschelde 4a4d6df04e
Merge pull request #90508 from smix8/thread_bake
Use threads for baking navigation mesh inside editor
2024-04-12 11:16:50 +07:00
smix8 1c134f4a3d Add navigation path simplification
Adds navigation path simplification for NavigationServer and NavigationAgent.
2024-04-11 12:32:21 +07:00
smix8 2bc2b52bd1 Use threads for baking navigation mesh inside editor
Enables threaded navigation mesh baking inside the editor.
2024-04-11 03:53:26 +07:00
smix8 d6ddeec0fd Make 2D navigation mesh baking parse all TileMapLayers
Makes 2D navigation mesh baking parse all TileMapLayers.
2024-04-04 10:45:53 +07:00
Pawel Lampe 64fc9e2156 Add navigation baking crash prevention mechanism 2024-03-23 22:20:00 +07:00
smix8 5d5e85fe07 Add NavigationObstacle options to affect and carve navigation mesh
Adds NavigationObstacle options to affect and carve navigation mesh.
2024-03-15 01:45:44 +07:00
Aaron Franke 6aac3e4a16 Disable all 3D nodes, physics, and resources when compiling without 3D 2024-03-11 01:00:55 +07:00
Jakub Marcowski 973448ec4c
clipper2: Update to 1.3.0 2024-03-01 11:12:59 +07:00
blackbird806 e2f1af8742
Remove self includes in some files 2024-02-27 17:10:54 +07:00
smix8 35dafc9fa8 Split monolithic physics class files
Splits monolithic physics class files.
2024-02-27 11:18:16 +07:00
Aaron Franke c399424db9
Move 3D-only resources to their own folder 2024-02-26 05:23:04 +07:00
Aaron Franke 1cb531ddb6
Move 2D-only resources to their own folder 2024-02-26 05:22:45 +07:00
Aaron Franke 138180fe01
Move 3D-only navigation code to its own subfolder 2024-02-26 04:19:12 +07:00
Aaron Franke fd582dca62
Move 2D-only navigation code to its own subfolder 2024-02-26 04:18:13 +07:00
A Thousand Ships 12cecf726f
[Navigation] Add some missing compile checks 2024-02-22 20:21:43 +07:00
smix8 2da69294fc Improve NavigationServer NavMap sync error msgs
Improves NavigationServer NavMap sync error msgs.
2024-02-22 13:49:31 +07:00
smix8 313c1d1100 Add function to get navigation map iteration id from NavigationServer
Adds function to get navigation map iteration id from NavigationServer.
2024-02-22 09:45:49 +07:00
Rémi Verschelde 24bd30716e
Merge pull request #87959 from Scony/fix-navi-sync-errors
Add means for fixing navmap synchronization errors
2024-02-12 13:34:30 +07:00
Rémi Verschelde 42c3a3827b
Merge pull request #79577 from smix8/navmap_rwlock_4.x
Make navigation map spatial queries thread-safe
2024-02-12 13:33:16 +07:00
Pawel Lampe 9ea8d4fa38 Add means for fixing navmap synchronization errors 2024-02-11 21:06:47 +07:00
A Thousand Ships 684752e75b
Replace error checks against `size` with `is_empty` 2024-02-09 12:50:15 +07:00
Rémi Verschelde 261952a4c7
Merge pull request #87378 from smix8/navmesh_bordersize
Add NavigationMesh `border_size` property for tile baking
2024-02-08 10:53:30 +07:00
Rémi Verschelde 8daa633d0d
Merge pull request #87961 from smix8/navmesh2d_bordersize
Add NavigationPolygon `border_size` property for tile baking
2024-02-07 11:01:42 +07:00
Rémi Verschelde 251d5b3669
Merge pull request #87715 from Scony/add-is-baking
Expose `is_baking` method in navigation servers and region nodes.
2024-02-07 10:58:27 +07:00
smix8 4cc8748c47 Make navigation map spatial queries thread-safe
Makes navigation map spatial queries thread-safe by adding a readers–writer lock.
2024-02-06 19:27:59 +07:00
Pawel Lampe c2cfc0d409 Expose `is_baking` method in navigation servers and region nodes. 2024-02-05 22:04:22 +07:00
smix8 085bc9504b Add NavigationPolygon border_size property for tile baking
Adds NavigationPolygon border_size property for tile baking. Also adds baking Rect2 bounds.
2024-02-05 00:38:28 +07:00
A Thousand Ships 15369fdb1d
Remove unnecessary `this->` expressions 2024-01-29 09:59:18 +07:00
smix8 d6c31017a6 Add NavigationMesh border_size property for tile baking
Adds NavigationMesh border_size property for tile baking.
2024-01-19 17:31:36 +07:00
Robert Yevdokimov f9826a1dd7 Fix various spelling errors 2024-01-04 09:56:43 +07:00
Nicholas Foo e7ee672120 Add getters to navigation servers
Add virtual functions and bind to navigation servers
Implement getters
Add documentation
2023-12-19 19:51:49 +07:00
Yuri Sizov d4806d2d84 Merge pull request #85253 from sandygk/fix-reachable-polygon-closest-to-end-point
[Navigation] Do not use travel cost for minimum when re-selecting end point
2023-12-19 13:01:45 +07:00
Gilles Roudière 18fe0bd025 Move tile transforms handling cache to TileData 2023-12-13 17:44:59 +07:00
Rémi Verschelde 84692c6252
Navigation: Fix GCC 12.3 `-Wtype-limits` warnings 2023-12-12 11:00:06 +07:00
smix8 64a56245d8 Add NavigationServer random point queries
Adds query functions to get random points on navigation mesh to the NavigationServer.
2023-12-08 00:18:05 +07:00
Rémi Verschelde 8a9e3ad8d5
Merge pull request #84816 from Scony/add-obstacle-navserver-tests
Fix memory leak in 'NavigationServer3D' involving static obstacles
2023-12-04 23:05:39 +07:00
Sandy Gutierrez 11e63d244e Do not use travel cost for minimum when re-selecting end point 2023-11-28 07:23:58 +07:00
Pawel Lampe a4b3546577 Fix memory leak in 'NavigationServer3D' involving static obstacles 2023-11-17 21:20:14 +07:00
smix8 3f26191d16 Fix NavigationObstacle height
Fixes NavigationObstacle height.
2023-11-13 21:32:22 +07:00
smix8 fc4cc27e66 Fix NavigationObstacle elevation
FixesNavigationObstacle elevation.
2023-11-13 06:55:31 +07:00
smix8 5e4ff965cc Fix potential crashes with TileMap navmesh baking
Fixes potential crashes with TileMap navmesh baking.
2023-10-24 14:51:52 +07:00
smix8 9416f0c266 Fix hole in heightmap navigation mesh baking
Fixes hole in heightmap navigation mesh baking.
2023-10-22 18:23:43 +07:00
smix8 ade4d3cf28 Fix NavigationLink enabled toggle
Fixes NavigationLink enabled toggle.
2023-10-21 03:11:37 +07:00
smix8 36146258de Fix NavRegion sync error messages
Fixes NavRegion sync error messages
2023-10-18 21:09:48 +07:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +07:00
A Thousand Ships 517e9f8aef [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-26 16:44:52 +07:00
kleonc 5904c2ca19 Fix typo in dev assert in NavMeshGenerator2D 2023-09-26 14:30:23 +07:00
smix8 0ee7e3102b Add 2D navigation mesh baking
Adds 2D navigation mesh baking.
2023-09-25 19:48:14 +07:00
Yuri Sizov 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +07:00
Yuri Sizov 3c63dce3cd Merge pull request #80573 from KoBeWi/2k_lines_of_changes_created_at_2AM
Add EditorStringNames singleton
2023-09-06 14:49:02 +07:00
Aaron Franke 93cf3391bd
Fix compiling with 3D disabled due to unused navigation variable 2023-09-04 03:16:55 +07:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +07:00
Rémi Verschelde 37d213b24e
Merge pull request #79972 from smix8/navgenerator_multithreading_4.x
Add multi-threaded NavMesh baking to NavigationServer
2023-08-17 11:22:11 +07:00
Ninni Pipping 740e2f3f62 Fix missing include for `NavigationMesh` 2023-08-08 11:12:20 +07:00
smix8 8686e84b44 Add multi-threaded NavMesh baking to NavigationServer
Adds multi-threaded NavMesh baking to NavigationServer.
2023-08-07 17:14:37 +07:00
Rémi Verschelde 7eb047a5ed
Merge pull request #79643 from smix8/navgenerator_4.x
Move navigation mesh baking to NavigationServer
2023-08-07 14:48:15 +07:00
smix8 744fa87da2 Move navigation mesh baking to NavigationServer
Moves navigation mesh baking to NavigationServer.
2023-08-03 19:49:07 +07:00
Ben Rog-Wilhelm d0564f2466
Fix NavMesh `map_update_id` returning 0 results in errors 2023-08-03 18:57:35 +07:00
Yuri Sizov d7f07820aa Merge pull request #79228 from smix8/fix_funnel_4.x
Fix pathfinding funnel adding unwanted point
2023-08-02 21:36:46 +07:00
Yuri Sizov 8367152723 Merge pull request #79916 from smix8/navobstacle_mutex_4.x
Update NavObstacle creation to new Mutex style
2023-07-26 18:40:45 +07:00
smix8 a8f5bd6d43 Update NavObstacle creation to new Mutex style
Updates NavObstacle creation to new Mutex style.
2023-07-26 12:56:27 +07:00
smix8 69fad39cf5 Add NavigationServer API to enable regions and links
Adds NavigationServer API to enable regions and links.
2023-07-26 01:20:15 +07:00
smix8 c51e264446 Fix pathfinding funnel adding unwanted point
Fixes pathfinding funnel adding unwanted point due to precision issues.
2023-07-23 03:24:14 +07:00
smix8 90e2d9fa7e Add more hints to navigation map cell size errors
Adds more hints to navigation map cell size errors.
2023-07-14 23:10:09 +07:00
Yuri Sizov d676246647 Merge pull request #79137 from smix8/region_bake_depr_4.x
Mark NavigationServer3D.region_bake_navigation_mesh() as deprecated
2023-07-12 15:09:50 +07:00
smix8 e5c24f7118 Fix closest possible navigation path position
Fixes closest possible navigation path position.
2023-07-08 23:16:47 +07:00
smix8 f7ebce2626 Mark NavigationServer3D.region_bake_navigation_mesh() as deprecated
Marks NavigationServer3D.region_bake_navigation_mesh() as deprecated.
2023-07-07 02:30:14 +07:00
Rémi Verschelde d0c1dd16ee
Revert "Update RVO2 to git 2022.09"
This reverts commit c920881105.

Fixes #78826.
2023-06-29 12:50:49 +07:00
smix8 4ae5dcca45 Fix NavObjects map assignments
Fixes NavObject map assignments.
2023-06-25 12:22:42 +07:00
smix8 ea96f5259f Fix NavigationMesh not clearing old polygons
Fixes NavigationMesh not clearing old polygons.
2023-06-23 02:53:09 +07:00
Rémi Verschelde d252f43a86
Merge pull request #78449 from Scony/add-agent-n-map-navserver-tests
Add `agent` and `map` tests for 'NavigationServer3D'
2023-06-21 10:19:24 +07:00
Pawel Lampe e1bdde911c Add `agent` and `map` tests for 'NavigationServer3D'
This commits fixes a bug in `free()` function as well.
2023-06-20 17:48:06 +07:00