Commit Graph

69 Commits

Author SHA1 Message Date
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
8b18898609 Backported from godot4: Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
- DarkKilauea
a0715b30f9
2023-06-09 22:03:42 +02:00
6384b9624f Ported from godot4: Make navigation mesh edge connections optional
Makes navigation mesh edge connections optional.
- smix8
f986b52b3c
2023-06-09 20:54:05 +02:00
29784d5d5b Ported from godot4: Enable assigning an owner to navigation regions and links
This allows users of the server APIs to get back the nodes that created certain regions and links.
- DarkKilauea
5769b0e8d8
2023-06-09 19:46:44 +02:00
160cb38a50 Ported from godot4: Add support for emitting a signal when entering a NavLink
- DarkKilauea
5d8ba2b2d1
2023-06-09 19:08:38 +02:00
e07fd6da59 Ported from godot4: Prevent unnecessary navigation map synchronizations
Prevents unnecessary navigation map synchronizations triggered by redundant calls to setters of e.g. region, link or map properties.
- smix8
7e1a261cc6
2023-06-09 16:43:14 +02:00
19fac49904 Turn PoolVectors in NavigationPathQueryResults into Vectors. 2023-06-09 16:27:24 +02:00
c11500d480 Ported from godot4: Rename Navigation uses of 'location' to 'position'
Contrary to the entire rest of the engine NavigationAgent's and NavigationLinks decided to deal with locations instead of positions.
- smix8
bf1571979c
2023-06-09 10:28:31 +02:00
b940854ca9 Ported from godot4: Add NavigationServer Performance Monitor
Adds Performance Monitor for NavigationServer3D.
- smix8
9802914f97
2023-06-09 10:17:43 +02:00
038329e7d0 Backported form godot4: Fix NavigationServer internals still using float instead of real_t
Fixes that some NavigationServer internals still used float instead of real_t in some parts.
- smix8
217a27014b
2023-06-09 08:53:00 +02:00
0438c3cc3f Backported from godot4: Added node for Navigation links .
- DarkKilauea
3dd59013f4
2023-06-08 20:46:09 +02:00
f6e65112d7 Backported from godot4: Add NavigationPathQuery
Adds NavigationPathQueryParameters objects that can be used with NavigationServer.query_path() to query a customized navigation path.
- smix8
63dcb9aa80
2023-06-08 18:23:48 +02:00
82316363eb Removed the old navigation mesh generator and it's editor plugin. 2023-06-06 13:59:33 +02:00
890d6f1b28 Removed region_bake_navmesh from the NavigationServer. 2023-06-06 09:36:19 +02:00
b7892d6baf Backported from godot4: Implement NavigationMesh bake area.
Adds two new properties to NavigationMesh resources to restrict the navmesh baking to an area enclosed by an AABB with volume.
- smix8
0c4d99f4fd
2023-06-05 14:24:42 +02:00
6589d075bb Ported the improvements to the NavigationPolygon from the aforementioned pull request. 2023-06-05 14:13:02 +02:00
0a3d1d6cf5 Added in NavigationMeshGeneratorDummy and set up initialization. 2023-06-03 20:00:42 +02:00
2114b2239b Split NavigationPolygon and NavigationPolygonInstance into 2 files. Also renamedNavigationPolygonInstance to NavigationRegion2D. 2023-06-03 16:54:48 +02:00
1c505fe527 Make sure the dummy navigation server is used automatically if the normal is disabled. 2023-04-16 19:10:30 +02:00
86bdecbfe9 Now more than one Naviugation2D servers can be registered. 2023-04-16 18:19:57 +02:00
f6c1c1dc8d Move NavigationServer2d's forwarding logic to the navigation module as a new derived class. 2023-04-16 18:11:15 +02:00
7068f1834e Now more than one Navigation Server can be registered. 2023-04-16 17:42:34 +02:00
8d7090241a Make sure that the editor can be built even when the new code_editor module is disabled. 2023-02-17 23:20:10 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
227e32b67c Now modules make use of the new registration levels. 2023-01-15 17:04:00 +01:00
8075ef8e62 Added include guards to all module register_types.h-s. 2023-01-15 13:27:08 +01:00
e9a19c1a66 Added module initialization levels (similar idea to what's in godot4, although I added more). 2023-01-15 11:46:13 +01:00
bad1d64314 Fix compile and small cleanups after the backports. 2022-12-22 15:24:53 +01:00
smix8
9225e78f68 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.

(cherry picked from commit 194c1c44e0a20faa4463e3a41bb12cf93a71fc03)
2022-12-22 14:12:00 +01:00
Haoyu Qiu
6126ddab8e Backport navigation crash fixes
Co-Authored-By: Sean <sean@geekotron.net>
2022-11-30 14:41:16 +01:00
575a19eafb Added back GridMap support for the NavigationMeshGenerator. 2022-10-09 00:01:13 +02:00
smix8
1c0898763c Fix avoidance calculation on NO_THREADS build 2022-10-08 17:24:55 +02:00
smix8
8be98b9138 Exclude disabled CollisionShapes from Navigationmesh baking
Excludes disabled CollisionShapes from the geometry parsing for the NavigationMesh baking.

(cherry picked from commit 534ff93b05446f5692bcee95f51400c211b080ff)
2022-10-08 16:23:20 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
2a13c65298 Ported: Visual/Physics/Navigation Servers validate RIDs with documentation update - tinmanjuggernaut
2be0738304
2022-08-19 02:52:31 +02:00
4c4e19223e Added _theme_ infix to the theme helper methods in Control. 2022-08-17 20:57:16 +02:00
686663d3e4 Moved around more classes in core. 2022-08-17 16:01:01 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
388b88678e Moved container related classes in core under a new containers directory. 2022-08-17 12:53:49 +02:00
58539a22b6 Backported from Godot4: Node3D gizmo improvements
* Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs.
* Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins.
* Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes.
* Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles.
* Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
- JFonS
cfb555a081
- Note: MeshDataResourceEditor is now kind of painful to use, it will be fixed a bit later.
2022-08-11 01:24:29 +02:00
65afe14ca4 Ported: [3.5] Replace Navigation std::vector use with LocalVector
Replace Navigation std::vector use with LocalVector.
- smix8
d0a78d05eb
2022-07-30 00:44:53 +02:00
11a92cfe27 Ported: Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.
- smix8
721c99a530
2022-07-29 17:56:48 +02:00
da20b32f66 Ported: Add NavigationServer.region_owns_point() helper function
Adds a helper function to check if a world space position is currently owned by a navigation region.
- smix8
f0069cc1e9
2022-07-29 17:52:38 +02:00
f811d48449 Ported: Add Navigation function to get all navigation maps
Added new function that returns all created navigation map RIDs from the NavigationServer. The function returns both 2D and 3D created navigation maps as technically there is no distinction between them.
- smix8
38ee593b76
2022-07-29 17:49:24 +02:00
smix8
149baac627 Disable thread-unsafe EditorProgress for navmesh baking
Disables navmesh baking EditorProgress for now until fixed as EditorProgress is not thread-safe and uses hacks and Main::iteration() for steps which can result in random crashes when baking navmesh.

(cherry picked from commit 24bb0af4a9ae7d2c9f56c20f3d3c6a4568fc9bf5)
2022-07-29 12:16:02 +02:00
8b63c97000 Ported: Print NavMap error only once for invalid NavMesh.- fire
bcd92b8aa0
2022-07-29 10:14:05 +02:00
smix8
6a01f2b717 Fix crash of navigation agents callback when object is invalid
Fix crash of navigation agents callback when object is invalid.

(cherry picked from commit bc38ebe4f07724850095094873d1b42bf914c6f3)
2022-07-29 09:04:03 +02:00
bb5acfd745 Ported: [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
- smix8
8bd7c6188b
2022-07-28 22:34:28 +02:00
smix8
62e781b914 Fix MultiMeshInstance crash in navmesh baking when MultiMesh Resource is empty
Fix MultiMeshInstance crash in navmesh baking when MultiMesh Resource is empty

(cherry picked from commit caceceab0819dca9da4ca3c268bc07ded933e332)
2022-07-28 11:52:25 +02:00