Commit Graph

566 Commits

Author SHA1 Message Date
697d4a32fc Backported from godot4: Change 2D navigation ProjectSettings from integers to floats
Changes 2D navigation ProjectSettings from integers to floats.
- smix8
2852fb43f7
2023-09-02 13:38:20 +02:00
d5499c69ba Backported from godot4: Fix crash in 'NavigationAgent3D', fixes #78910
- Scony
fcbb521392
2023-09-02 13:28:16 +02:00
62c5bfbc36 Backported from godot4: Remove legacy navigation debug materials
Removes legacy navigation debug materials.
- smix8
1b506cd49c
2023-09-02 13:18:16 +02:00
09af276838 Backported from godot4: Add NavigationPolygon cell_size property
- smix8
9c8626bfd8
2023-09-02 13:12:46 +02:00
8467cf9e94 Backported from godot4: Keep NavigationServer active while SceneTree is paused.
- smix8
4b0dee080e
2023-09-02 12:57:35 +02:00
d1d8f8505e Backported from godot4: Strip name prefix of navigation agent debug properties in the inspector.
- timothyqiu
65223e98de
2023-09-02 12:56:02 +02:00
2dc300a0fc Backported from godot4: Stops NavigationAgents moving to the world origin without anyone telling them to do so.
-smix8
860379fc16
2023-09-02 12:47:13 +02:00
61bf4df2f4 Fix NavigationObstacle2D::set_navigation. 2023-09-02 12:31:55 +02:00
4b3a27f415 Bind get_navigation_map and set_navigation_map in NavigationObstacle2D. 2023-09-02 12:22:27 +02:00
569c2e9f85 Simplify some logic NavigationObstacle2D. 2023-09-02 12:16:31 +02:00
eb8943a4f6 Backported from godot4: Add Path2D/3D debug options
- smix8
e12e239ab4
2023-09-02 11:38:01 +02:00
2c3c7dcc73 Fix threaded bake logic in NavigationPolygonInstance and NavigationMeshInstance. 2023-08-30 14:36:33 +02:00
62e2b1623a Use NULLs. 2023-08-30 13:24:46 +02:00
7e270262f9 Ported: Fix binary internal cache not being filled
- Razoric480
d331e5c7ac
2023-08-30 13:00:53 +02:00
4a51324f7d Ported: Force external resources to have their path set
- Razoric480
420794b61d
2023-08-30 12:57:00 +02:00
5d93975c8d Ported: Fix custom res caching sub-res even if no-cache
-Razoric480
2ceb93bbef
2023-08-30 12:55:37 +02:00
Paweł
14c218d23a Fix scrolling behaviour with low page value
(cherry picked from commit 1608bea18809dcb4e744ee936f8de8f5660adfbe)
2023-08-30 10:48:48 +02:00
Haoyu Qiu
df406d2027 Notify child controls when BackBufferCopy's rect changed
(cherry picked from commit 602a0d2fbc84d598cffc79eccd5110f650b6e3c9)
2023-08-30 10:48:20 +02:00
e5cec36ba0 Ported: Physics Interpolation 2D - reset on NOTIFICATION_ENTER_TREE
As a convenience, physics interpolation is reset automatically on entering the tree. This will be desired in most situations, and saves the user having to write code for this explicitly.
- lawnjelly
bcfca5ec86
2023-08-27 22:02:26 +02:00
a29d232a4c Ported: Physics Interpolation - add support for CPUParticles2D
Similar to the existing 3D CPUParticles physics interpolation.
- lawnjelly
a117a3307a
2023-08-27 21:59:54 +02:00
d977ed360e Ported: 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
- lawnjelly
5162efbfe9
2023-08-27 18:48:25 +02:00
87b91721da Ported: Physics interpolation - Move out of Scenario
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.

Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
- lawnjelly
d2b1d29634
2023-08-27 17:25:38 +02:00
Silc Lizard (Tokage) Renew
8d4078b7b5 Make AnimationNodeBlendTree use OrderedHashMap insteads Map 2023-08-27 12:24:02 +02:00
lawnjelly
3954a79659 Fix AnimatedSprite normal map loading
Normal map names are now correctly set up during loading.
2023-08-27 12:15:46 +02:00
lawnjelly
ca171817a8 MultiRect - Fix flushing in TextEdit
The FontDrawer used in TextEdit was previously not being flushed before drawing auto-completion boxes. This was causing rendering artifacts.
This PR also increases the backward compatibility of the MultiRect OFF mode, by forcing a flush after each character.
2023-08-27 11:45:09 +02:00
5861ad6485 Fix typos in _rpc_id_bind and _rpc_unreliable_id_bind. 2023-08-15 23:42:34 +02:00
01c3cd88d5 Make sure rpc binds can take both Strings and StringNames as method names. 2023-08-15 10:24:30 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
53d36345e6 Added back CSG support code I removed. 2023-07-11 12:23:46 +02:00
5b869f8b54 Ported from godot: Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).
Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
- lawnjelly
b777a9e5f9
2023-06-28 20:25:48 +02:00
75ceb22100 Revert "Add option in VisibilityEnabler2D to hide the parent for better performance"
This reverts commit ad6e504a5b.
2023-06-28 19:00:29 +02:00
Maganty Rushyendra
97dee88433 Fix overwriting of Spatial's local transform
Modifies when 'DIRTY_LOCAL' flag is set to prevent a transform applied
using `set_transform` to be overwritten by previous calls to change the
node's rotation, translation or scale.

Fixes #43130.
2023-06-28 12:23:08 +02:00
Patrick
78bc0eeb97 Backport VideoLooping and fix for initial black frame 2023-06-28 12:22:49 +02:00
c5e893897e Changed 2 errors to just an if. 2023-06-15 15:42:07 +02:00
6c70361a07 Fix debugging on the android editor. 2023-06-15 11:30:26 +02:00
1a5cba555c Backported godot4 PR: Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.
This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
- reduz
PR 76582
Will be available here after it's merged:
6b176671c4
2023-06-14 14:43:55 +02:00
decade59c8 Implemented a new ProcessGroup Node. It can be used to multithread scenes updates.
It was insipred by godot 4's ProcessGroup system, however while Godot 4's implementation tries to hide threaded processing as much as possible, this implementation focuses on making it explicitly known and obvious to the user, in a (hopefully) almost bolierplate free way.

Also with the available options this node can be used for other purposes, like multi threaded cron job like method calls when paired with a Timer in manual mode.
2023-06-13 15:08:35 +02:00
d4175f9676 Ported parts of : Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.
This is the first steps towards implementing godotengine/godot-proposals#6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
- reduz
98c655ec8d
- Only got the smaller improvements, and the thread safety for Node and SceneTree. I'm planning to implement a similar system, but I have a different way of doing it in mind.
2023-06-12 21:13:26 +02:00
de1763d40d Renamed neighbor_dist properties / getters / setters for the navigation server. 2023-06-12 08:37:57 +02:00
975e5c4a9e Rethink the previous fix. 2023-06-11 18:32:15 +02:00
50c96d5414 Fix building with ptrcall on. 2023-06-11 18:02:58 +02:00
Ricardo Subtil
3191832c37 Fix PopupMenu's maximum height not being automatically set 2023-06-11 09:22:06 +02:00
kobewi
147640412a Cache text property when toggling BBCode 2023-06-11 09:21:25 +02:00
ShadyChibinko
38bb088c1e Add Tab Metadata 2023-06-11 09:19:03 +02:00
needleful
cfabdb87f0 Add allow_search property to ItemList and Tree 2023-06-11 09:12:26 +02:00
David Turner
1fc8096770 Stop dragging when a slider changes editability 2023-06-11 09:05:53 +02:00
lawnjelly
22d90711da Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-06-11 08:41:42 +02:00
37273d29c9 Ported: Multirect - Fix refining regions for all derived Textures
Fixes allowing all derived texture types to modify region prior to rendering.
- lawnjelly
43b6205887
2023-06-11 00:47:10 +02:00
8642a7c722 Ported: Fix rendering tiles using nested AtlasTextures
- kleonc
12c923cb8b
2023-06-11 00:23:26 +02:00
52ea64d04b Ported: Fix GridContainer max row/column calculations not skipping hidden children
- kleonc
0ce6ef7215
2023-06-10 23:50:41 +02:00
Ninni Pipping
feb55d26d2 Fix size error in BitMap.opaque_to_polygons
Previous estimate of upper limit on size was incorrect
2023-06-10 23:35:51 +02:00
670e465d24 Fix compile error. 2023-06-10 21:25:18 +02:00
23de574af6 Fix non tools build. 2023-06-10 21:11:44 +02:00
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
81c392489a Ported from godot4: Add NavigationLink helper functions for global positions
Adds helper functions to set the links start and end position with global positions or get them as global positions.
Adds global start and end position for the navigation link to the 'link_reached' signal of NavigationAgent. That signal gets emitted when a navigation link waypoint is reached. Requires that 'owner' meta data is enabled on the NavigationAgent.
- smix8
d87f124768
2023-06-09 20:00:28 +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
b2d8199a7b Ported from godot4: Update NavigationAgent to use query_path
This paves the way for having agents respond to link traversal.
- DarkKilauea
a2c53b881b
2023-06-09 16:19:22 +02:00
12b95cdc1f Ported from godot4: Add navigation layer bitmask helper functions
Adds helper functions to work with the navigation layer bitmask.
- smix8
55923ade68
2023-06-09 15:44:12 +02:00
e98e415168 Fix signal handler error. 2023-06-09 14:18:08 +02:00
268645ff0b Ported from godot4: Add NavigationAgent Path Debug Visualization
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
- smix8
0ab764e84b
2023-06-09 14:17:54 +02:00
11c84049fa Ported from godot4: Fix NavigationMesh debug visuals for non-triangulated meshes
Fixes NavigationMesh debug visuals for non-triangulated meshes.
- smix8
4490a3303b
2023-06-09 13:03:30 +02:00
23daaf95a6 Ported from godot4: Fix 2D navigation debug visuals ignoring half the ProjectSettings
Fixes that NavigationRegion2D and TileMap debug visuals ignored more or less half the ProjectSetting. E.g. random color could not be disabled, edges did not display.
2b19c70664
2023-06-09 11:29:33 +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
0438c3cc3f Backported from godot4: Added node for Navigation links .
- DarkKilauea
3dd59013f4
2023-06-08 20:46:09 +02:00
91f365b183 Added CapsuleShape2D support for StaticBody2DNavigationGeometryParser2D. 2023-06-07 00:36:53 +02:00
d344005b8d Don't unref() the NavigationMesh in NavigationPolygon. 2023-06-06 23:44:33 +02:00
5ace0cd58f Fix signal double connection. 2023-06-06 23:17:46 +02:00
316a53bfbf Fix non tools build. 2023-06-06 13:51:33 +02:00
27ee583bb8 Ported missing changes to NavigationPolygonInstance from the navigation mesh generator rework pr. 2023-06-06 13:17:59 +02:00
09118cb939 Port small tweaks fot NavigationMeshInstance. 2023-06-06 10:14:15 +02:00
b993bd4760 Only register NavigationMeshSourceGeometryData3D if 3d is enabled. 2023-06-06 10:04:14 +02:00
c898d9bc51 NAvigationMesh small tweaks. 2023-06-06 10:02:47 +02:00
63892627f7 Ported missing changes to NavigationPolygon from the navigation mesh generator rework pr. 2023-06-06 09:58:44 +02:00
a1b23406a1 Rework NavigationMeshInstance as per the navigation mesh generators pr. 2023-06-06 09:35:59 +02:00
2296bf693a Fix and finally enable PandemoniumNavigationMeshGenerator. 2023-06-05 20:42:35 +02:00
26ff340d47 Reorganized NavigationMesh. 2023-06-05 19:21:59 +02:00
a3aebe8bc5 Ported the improvements to the NavigationMesh from the NavigationMeshGenerator rework pr. 2023-06-05 19:20:28 +02:00
c72a079c49 Removed the Polygon struct from NavigationMesh. 2023-06-05 19:07:04 +02:00
3c9d9bdad4 Ported from godot4: Fix NavigationRegion3D gizmo's odd visual behavior .
- DarkKilauea
92c40bcf32
2023-06-05 19:02:24 +02:00
25078b1437 Ported from godot4: Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
- smix8
d7f75fab60
2023-06-05 18:56:41 +02:00
b6de23ac8a Fix non tools build. 2023-06-05 18:21:45 +02:00
654cfb81b7 Renamed NavigationRegion2D back to NavigationPolygonInstance, as I think it fits the engine better. 2023-06-05 18:09:53 +02:00
68b9f4c90e Ported from godot4: Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
- smix8
c394ea518e
2023-06-05 18:05:15 +02:00
cfa4384ad4 Backported from godot4: Fix NavigationMesh baking AABB Editor handling and visuals
Fixes handling and visuals for Navigation Mesh baking AABB in the Editor.
- smix8
2023-06-05 14:33:55 +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
712eb8eb8a Removed the Polygon struct from NavigationPolygon. 2023-06-05 12:48:57 +02:00
0bfa40bb09 Reorganize NavigationPolygon. 2023-06-05 12:44:49 +02:00
54ae614941 Make sure that the new classes are registered to the ClassDB. Also added in the docs for them. 2023-06-03 20:39:56 +02:00
8cbb1bb879 Started porting pull request from godot 4: Rework NavigationMeshGenerator
Reworks NavigationMeshGenerator and navigation mesh parse and bake process. Adds navigation mesh baking for 2D.
- smix8
https://github.com/godotengine/godot/pull/70724
38699a8259
2023-06-03 18:22:12 +02:00
2114b2239b Split NavigationPolygon and NavigationPolygonInstance into 2 files. Also renamedNavigationPolygonInstance to NavigationRegion2D. 2023-06-03 16:54:48 +02:00
6b15eb053c Fix property bind inconsistency. 2023-06-02 12:17:16 +02:00
f4a4956b7a Ported: Fix Polygon2D skinned bounds (for culling)
The bound Rect2 was previously incorrect because bone transforms need to be applied to verts in bone space, rather than local space. This was previously resulting in skinned Polygon2Ds being incorrectly culled.
- lawnjelly
dd6c213dac
2023-05-01 13:34:35 +02:00
BimDav
ad6e504a5b Add option in VisibilityEnabler2D to hide the parent for better performance 2023-05-01 12:22:39 +02:00
Fredia Huya-Kouadio
0947677049 Make tab's close button responsive to touch taps 2023-05-01 12:10:43 +02:00